diff options
author | Daniel Drake <dsd@laptop.org> | 2009-11-23 12:36:33 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2009-11-23 12:47:11 (GMT) |
commit | bd3fdd73a853d618aa5000ff5b1ce82f196c8b70 (patch) | |
tree | ef9c4b32cc06693a90200d77dc75879023fec298 /src/jarabe/journal/expandedentry.py | |
parent | cff9e43527ead20b088a9bfc6bbf12b0827debfd (diff) |
Switch entirely to simplejson
I misunderstood the state of affairs with the numerous json parsers.
Whatever we used to have as 'json' isn't really available on Py2.6.
Move to simplejson which seems to be the most functional implementation,
available on both old and new setups.
Diffstat (limited to 'src/jarabe/journal/expandedentry.py')
-rw-r--r-- | src/jarabe/journal/expandedentry.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py index 4463cac..e73b717 100644 --- a/src/jarabe/journal/expandedentry.py +++ b/src/jarabe/journal/expandedentry.py @@ -23,7 +23,7 @@ import hippo import cairo import gobject import gtk -import json +import simplejson from sugar.graphics import style from sugar.graphics.icon import CanvasIcon @@ -303,9 +303,7 @@ class ExpandedEntry(hippo.CanvasBox): if self._metadata.has_key('buddies') and \ self._metadata['buddies']: - # json cannot read unicode strings - buddies_str = self._metadata['buddies'].encode('utf8') - buddies = json.read(buddies_str).values() + buddies = simplejson.loads(self._metadata['buddies']).values() vbox.append(BuddyList(buddies)) return vbox else: |