From 5eb9ef7b53ac398478791e75df92269f8e3b3963 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 1 Sep 2011 11:45:19 +0200 Subject: closed #385 --- module/common/json.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 module/common/json.py (limited to 'module/common/json.py') diff --git a/module/common/json.py b/module/common/json.py new file mode 100644 index 000000000..e9ed003a0 --- /dev/null +++ b/module/common/json.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