From fde52383c637b1d5648d7550a29bb9b1215e896c Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Thu, 09 Aug 2012 13:22:12 +0000 Subject: Use json as included in Python SL #3142 We use json as included in Python. This will make Sugar dependent on Python 2.6 and Python 2.7 to have the highest JSON performance. Signed-off-by: Manuel Kaufmann Acked-by: Gonzalo Odiard --- (limited to 'readbookmark.py') diff --git a/readbookmark.py b/readbookmark.py index 6a8e96c..c0afe4f 100644 --- a/readbookmark.py +++ b/readbookmark.py @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import cjson +import json class Bookmark: @@ -39,12 +39,12 @@ class Bookmark: if self.content == '' or self.content is None: return '' - note = cjson.decode(self.content) + note = json.loads(self.content) return note['title'] def get_note_body(self): if self.content == '' or self.content is None: return '' - note = cjson.decode(self.content) + note = json.loads(self.content) return note['body'] -- cgit v0.9.1