Skip to content

Commit

Permalink
Fix JSON import example
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
Alex Marandon committed Oct 3, 2014
1 parent e1d65ba commit 028be03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tablib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def json():
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.
"""
Expand Down

0 comments on commit 028be03

Please sign in to comment.