From 63cef4c7d641ffddaeabcd768020674e2681ba05 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 20 Mar 2013 21:39:30 +0100 Subject: improved ui, render waiting files --- module/utils/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'module/utils/__init__.py') diff --git a/module/utils/__init__.py b/module/utils/__init__.py index 8f7ed6231..901f553e7 100644 --- a/module/utils/__init__.py +++ b/module/utils/__init__.py @@ -9,6 +9,15 @@ from string import maketrans from itertools import islice from htmlentitydefs import name2codepoint +# abstraction layer for json operations +try: # since python 2.6 + import json +except ImportError: #use system simplejson if available + import simplejson as json + +json_loads = json.loads +json_dumps = json.dumps + def decode(string): """ decode string with utf if possible """ try: -- cgit v1.2.3