From 68d662e689cd42687341c550fb6ebb74e6968d21 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Sep 2014 00:29:57 +0200 Subject: module -> pyload --- pyload/common/json_layer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pyload/common/json_layer.py (limited to 'pyload/common/json_layer.py') diff --git a/pyload/common/json_layer.py b/pyload/common/json_layer.py new file mode 100644 index 000000000..bb3937cdc --- /dev/null +++ b/pyload/common/json_layer.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +# abstraction layer for json operations + +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 -- cgit v1.2.3