Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2012-08-08 13:10:18 (GMT)
committer Simon Schampijer <simon@schampijer.de>2012-08-08 14:44:49 (GMT)
commitd1b8d3d70234664f3dd92e1ad205e3ce42832478 (patch)
treeb52e0785469742908b2b746c92f70e96c809ab45
parenteea18a12d14d3d5dc8c9f771a19cbdaf4962f9cf (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. The same patch landed in toolkit-gtk3 already. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r--src/sugar/activity/activity.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index bfc7358..2cf347e 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -54,6 +54,7 @@ import os
import time
from hashlib import sha1
from functools import partial
+import json
import gconf
import gtk
@@ -61,7 +62,6 @@ 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, \
@@ -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: