summaryrefslogtreecommitdiffstats
path: root/module/utils/json_layer.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-05-24 21:06:34 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-05-24 21:06:34 +0200
commitca43deb9769b4a6a9cfb7fbab7fb4d2256c2c403 (patch)
treee1527647682e6907ac8a0848e42dad68190f9813 /module/utils/json_layer.py
parentfixed loading of js files (diff)
downloadpyload-ca43deb9769b4a6a9cfb7fbab7fb4d2256c2c403.tar.xz
moved common to utils package
Diffstat (limited to 'module/utils/json_layer.py')
-rw-r--r--module/utils/json_layer.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/module/utils/json_layer.py b/module/utils/json_layer.py
new file mode 100644
index 000000000..cf9743603
--- /dev/null
+++ b/module/utils/json_layer.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# abstraction layer for json operations
+
+print ".json_layer is deprecated, use .json instead"
+
+try: # since python 2.6
+ import json
+ from json import loads as json_loads
+ from json import dumps as json_dumps
+except ImportError: #use system simplejson if available
+ import simplejson as json
+ from simplejson import loads as json_loads
+ from simplejson import dumps as json_dumps