diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-08 00:29:57 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 11:02:23 +0200 |
commit | 68d662e689cd42687341c550fb6ebb74e6968d21 (patch) | |
tree | 486cef41bd928b8db704894233b2cef94a6e346f /pyload/common/json_layer.py | |
parent | save_join -> safe_join & save_path -> safe_filename (diff) | |
download | pyload-68d662e689cd42687341c550fb6ebb74e6968d21.tar.xz |
module -> pyload
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 |