diff options
Diffstat (limited to 'pyload/common/json_layer.py')
-rw-r--r-- | pyload/common/json_layer.py | 12 |
1 files changed, 12 insertions, 0 deletions
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 |