From 6f8b5347dfa119a3df21f4ca8ba8c2b1537a726a Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 6 Jan 2013 15:54:52 +0100 Subject: first working parts of config api --- module/remote/json_converter.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'module/remote/json_converter.py') diff --git a/module/remote/json_converter.py b/module/remote/json_converter.py index ad7645ccc..5b85f30cd 100644 --- a/module/remote/json_converter.py +++ b/module/remote/json_converter.py @@ -11,6 +11,9 @@ import ttypes from ttypes import BaseObject from ttypes import ExceptionObject +# compact json separator +separators = (',', ':') + # json encoder that accepts TBase objects class BaseEncoder(json.JSONEncoder): @@ -34,6 +37,7 @@ def convert_obj(dct): def dumps(*args, **kwargs): kwargs['cls'] = BaseEncoder + kwargs['separators'] = separators return json.dumps(*args, **kwargs) -- cgit v1.2.3