diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-09-24 19:57:37 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-09-25 12:11:07 (GMT) |
commit | accd3f4d2124a43922f8a70e0f0003ef28aa27a2 (patch) | |
tree | 01917a89f95909b04da7927a7f3e88ef7711c9a5 | |
parent | 58bf6e470904b630d24f6344fcdeee612585717c (diff) |
Replace cjson by json due to deprecation
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | speak/face.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/speak/face.py b/speak/face.py index 5ad632c..f11a74c 100644 --- a/speak/face.py +++ b/speak/face.py @@ -24,7 +24,7 @@ import logging import gtk -import cjson +import json from gettext import gettext as _ import sugar.graphics.style as style @@ -56,7 +56,7 @@ class Status: fft_mouth.FFTMouth : 2, waveform_mouth.WaveformMouth : 3 } - return cjson.encode({ + return json.dumps({ 'voice' : { 'language' : self.voice.language, 'name' : self.voice.name }, 'pitch' : self.pitch, @@ -71,7 +71,7 @@ class Status: 2: fft_mouth.FFTMouth, 3: waveform_mouth.WaveformMouth } - data = cjson.decode(buf) + data = json.loads(buf) self.voice = voice.Voice(data['voice']['language'], data['voice']['name']) self.pitch = data['pitch'] |