From fa41674089843fc931fb53ec60db5dabe3574b13 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 22 Sep 2011 22:46:30 +0200 Subject: fixed json import --- module/common/json_layer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 module/common/json_layer.py (limited to 'module/common/json_layer.py') 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 -- cgit v1.2.3