Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2012-03-23 11:37:34 (GMT)
committer Simon Schampijer <simon@schampijer.de>2012-03-23 14:33:29 (GMT)
commit8b7a3b5cebb8ed7ead60841d052c02753d09ac34 (patch)
treee3cd38ca9a7b3d8d328a8b2a67a319c4dac2d17a /model.py
parent3a2bd49d8d284995e0924e2d6b0a9759fe4c46f3 (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. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'model.py')
-rw-r--r--model.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/model.py b/model.py
index d3d26e4..5dce50c 100644
--- a/model.py
+++ b/model.py
@@ -16,7 +16,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-import cjson
+import json
import sha
from gi.repository import GObject
import base64
@@ -59,10 +59,10 @@ class Model(GObject.GObject):
break
def serialize(self):
- return cjson.encode(self.data)
+ return json.dumps(self.data)
def deserialize(self, data):
- self.data = cjson.decode(data)
+ self.data = json.loads(data)
self.data.setdefault('shared_links', [])
self.data.setdefault('deleted', [])