diff options
author | Simon Schampijer <simon@schampijer.de> | 2012-03-22 16:58:07 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2012-03-22 17:46:48 (GMT) |
commit | 3c39375d9bb59a2bb1c9ec163645d0b4939893ae (patch) | |
tree | 227c08073df0e8d002d7224d0739d963965ac185 | |
parent | ad825a07aabbc7c6e828e45edb170ebd1a078d61 (diff) |
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: Simon Schampijer <simon@laptop.org>
-rw-r--r-- | src/sugar3/activity/activity.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py index 56371a4..808cccb 100644 --- a/src/sugar3/activity/activity.py +++ b/src/sugar3/activity/activity.py @@ -56,6 +56,7 @@ from hashlib import sha1 from functools import partial import StringIO import cairo +import json from gi.repository import GConf from gi.repository import Gtk @@ -64,7 +65,6 @@ from gi.repository import GObject import dbus import dbus.service from dbus import PROPERTIES_IFACE -import cjson from telepathy.server import DBusProperties from telepathy.interfaces import CHANNEL, \ CHANNEL_TYPE_TEXT, \ @@ -724,8 +724,8 @@ class Activity(Window, Gtk.Container): buddies_dict = self._get_buddies() if buddies_dict: - self.metadata['buddies_id'] = cjson.encode(buddies_dict.keys()) - self.metadata['buddies'] = cjson.encode(self._get_buddies()) + self.metadata['buddies_id'] = json.dumps(buddies_dict.keys()) + self.metadata['buddies'] = json.dumps(self._get_buddies()) preview = self.get_preview() if preview is not None: |