Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activity.py6
-rw-r--r--face.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/activity.py b/activity.py
index 2ef0cbe..f632032 100644
--- a/activity.py
+++ b/activity.py
@@ -26,7 +26,7 @@ from gi.repository import Gdk
from gi.repository import Pango
import logging
-import cjson
+import json
from sugar3.presence import presenceservice
from sugar3.graphics.toolbarbox import ToolbarButton
@@ -293,7 +293,7 @@ class SpeakActivity(SharedActivity):
% xoOwner.props.nick)
def resume_instance(self, file_path):
- cfg = cjson.decode(file(file_path, 'r').read())
+ cfg = json.loads(file(file_path, 'r').read())
status = self.face.status = face.Status().deserialize(cfg['status'])
self.voices.select(status.voice)
@@ -315,7 +315,7 @@ class SpeakActivity(SharedActivity):
'history': [unicode(i[0], 'utf-8', 'ignore') \
for i in self.entrycombo.get_model()],
}
- file(file_path, 'w').write(cjson.encode(cfg))
+ file(file_path, 'w').write(json.dumps(cfg))
def share_instance(self, connection, is_initiator):
self.chat.messenger = Messenger(connection, is_initiator, self.chat)
diff --git a/face.py b/face.py
index a44da8c..1fd8aa0 100644
--- a/face.py
+++ b/face.py
@@ -22,7 +22,7 @@
# along with Speak.activity. If not, see <http://www.gnu.org/licenses/>.
import logging
-import cjson
+import json
from gi.repository import Gtk
from gi.repository import Gdk
@@ -60,7 +60,7 @@ class Status():
FFTMouth: 2,
WaveformMouth: 3}
- return cjson.encode({
+ return json.dumps({
'voice': {'language': self.voice.language,
'name': self.voice.name},
'pitch': self.pitch,
@@ -75,7 +75,7 @@ class Status():
2: FFTMouth,
3: WaveformMouth}
- data = cjson.decode(buf)
+ data = json.loads(buf)
self.voice = voice.Voice(data['voice']['language'],
data['voice']['name'])
self.pitch = data['pitch']