Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--readbookmark.py6
-rw-r--r--readdialog.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/readbookmark.py b/readbookmark.py
index 6a8e96c..c0afe4f 100644
--- a/readbookmark.py
+++ b/readbookmark.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import cjson
+import json
class Bookmark:
@@ -39,12 +39,12 @@ class Bookmark:
if self.content == '' or self.content is None:
return ''
- note = cjson.decode(self.content)
+ note = json.loads(self.content)
return note['title']
def get_note_body(self):
if self.content == '' or self.content is None:
return ''
- note = cjson.decode(self.content)
+ note = json.loads(self.content)
return note['body']
diff --git a/readdialog.py b/readdialog.py
index b6366bf..4c868d5 100644
--- a/readdialog.py
+++ b/readdialog.py
@@ -9,7 +9,7 @@ from sugar3.graphics import style
from sugar3.graphics.toolbutton import ToolButton
from gettext import gettext as _
-import cjson
+import json
class BaseReadDialog(Gtk.Window):
@@ -180,7 +180,7 @@ class BookmarkAddDialog(BookmarkDialog):
content = {'title': title.decode('utf-8'),
'body': details.decode('utf-8')}
self._sidebarinstance._real_add_bookmark(self._page,
- cjson.encode(content))
+ json.dumps(content))
self.destroy()
def cancel_clicked_cb(self, widget):
@@ -202,5 +202,5 @@ class BookmarkEditDialog(BookmarkDialog):
'body': details.decode('utf-8')}
self._sidebarinstance.del_bookmark(self._page)
self._sidebarinstance._real_add_bookmark(self._page,
- cjson.encode(content))
+ json.dumps(content))
self.destroy()