From 028be03c2ce66174cddc5ec4bf92445bb8801316 Mon Sep 17 00:00:00 2001 From: Alex Marandon Date: Fri, 3 Oct 2014 09:17:38 +0200 Subject: [PATCH] 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" --- tablib/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tablib/core.py b/tablib/core.py index b275d8a..f8e2df7 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -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. """