summaryrefslogtreecommitdiffstats
path: root/module/common/json_layer.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/common/json_layer.py')
-rw-r--r--module/common/json_layer.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/common/json_layer.py b/module/common/json_layer.py
new file mode 100644
index 000000000..e9ed003a0
--- /dev/null
+++ b/module/common/json_layer.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