[Sugar-devel] [PATCH sugar-toolkit] Use json as included in Python SL #3142
Manuel Kaufmann
humitos at gmail.com
Wed Aug 8 10:28:17 EDT 2012
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 <humitos at gmail.com>
---
src/sugar/activity/activity.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index bfc7358..1e3aa33 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -61,7 +61,7 @@ import gobject
import dbus
import dbus.service
from dbus import PROPERTIES_IFACE
-import cjson
+import json
from telepathy.server import DBusProperties
from telepathy.interfaces import CHANNEL, \
CHANNEL_TYPE_TEXT, \
@@ -677,8 +677,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:
--
1.7.11.2
More information about the Sugar-devel
mailing list