Fix JSON import example

The example was triggering this error:

    JSONError: Expecting property name: line 1 column 3 (char 2)

This is because JSON property names should be wrapped in double
quotes.

While at it, I've fixed the typo in "last_name"
This commit is contained in:
Alex Marandon
2014-10-03 09:17:38 +02:00
parent e1d65ba3c8
commit 028be03c2c
+1 -1
View File
@@ -544,7 +544,7 @@ class Dataset(object):
A dataset object can also be imported by setting the :class:`Dataset.json` attribute: ::
data = tablib.Dataset()
data.json = '[{age: 90, first_name: "John", liast_name: "Adams"}]'
data.json = '[{"age": 90, "first_name": "John", "last_name": "Adams"}]'
Import assumes (for now) that headers exist.
"""