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>
This commit is contained in:
Simon Schampijer 2012-03-22 17:58:07 +01:00
parent ad825a07aa
commit 3c39375d9b

View File

@ -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: