From 3c39375d9bb59a2bb1c9ec163645d0b4939893ae Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 22 Mar 2012 17:58:07 +0100 Subject: [PATCH] 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 --- src/sugar3/activity/activity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py index 56371a47..808cccbf 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: