summaryrefslogtreecommitdiffstats
path: root/module/utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/utils/__init__.py')
-rw-r--r--module/utils/__init__.py9
1 files changed, 9 insertions, 0 deletions
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: