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:
parent
ad825a07aa
commit
3c39375d9b
@ -56,6 +56,7 @@ from hashlib import sha1
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
import StringIO
|
import StringIO
|
||||||
import cairo
|
import cairo
|
||||||
|
import json
|
||||||
|
|
||||||
from gi.repository import GConf
|
from gi.repository import GConf
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
@ -64,7 +65,6 @@ from gi.repository import GObject
|
|||||||
import dbus
|
import dbus
|
||||||
import dbus.service
|
import dbus.service
|
||||||
from dbus import PROPERTIES_IFACE
|
from dbus import PROPERTIES_IFACE
|
||||||
import cjson
|
|
||||||
from telepathy.server import DBusProperties
|
from telepathy.server import DBusProperties
|
||||||
from telepathy.interfaces import CHANNEL, \
|
from telepathy.interfaces import CHANNEL, \
|
||||||
CHANNEL_TYPE_TEXT, \
|
CHANNEL_TYPE_TEXT, \
|
||||||
@ -724,8 +724,8 @@ class Activity(Window, Gtk.Container):
|
|||||||
|
|
||||||
buddies_dict = self._get_buddies()
|
buddies_dict = self._get_buddies()
|
||||||
if buddies_dict:
|
if buddies_dict:
|
||||||
self.metadata['buddies_id'] = cjson.encode(buddies_dict.keys())
|
self.metadata['buddies_id'] = json.dumps(buddies_dict.keys())
|
||||||
self.metadata['buddies'] = cjson.encode(self._get_buddies())
|
self.metadata['buddies'] = json.dumps(self._get_buddies())
|
||||||
|
|
||||||
preview = self.get_preview()
|
preview = self.get_preview()
|
||||||
if preview is not None:
|
if preview is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user