summaryrefslogtreecommitdiffstats
path: root/module/common
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-01 11:45:19 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-01 11:45:19 +0200
commit5eb9ef7b53ac398478791e75df92269f8e3b3963 (patch)
tree078731ae0d7714b5e661c13045e5618a56355caf /module/common
parentfix last commit (diff)
downloadpyload-5eb9ef7b53ac398478791e75df92269f8e3b3963.tar.xz
closed #385
Diffstat (limited to 'module/common')
-rw-r--r--module/common/json.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/common/json.py b/module/common/json.py
new file mode 100644
index 000000000..e9ed003a0
--- /dev/null
+++ b/module/common/json.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+# abstraction layer for json operations
+
+try: # since python 2.7
+ from json import loads as json_loads
+ from json import dumps as json_dumps
+except ImportError:
+ from module.lib.simplejson import loads as json_loads
+ from module.lib.simplejson import dumps as json_dumps \ No newline at end of file