diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-06 15:54:52 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-06 15:54:52 +0100 |
commit | 6f8b5347dfa119a3df21f4ca8ba8c2b1537a726a (patch) | |
tree | 627c4d99f0aaa4c8022b70b3ebe72f201d924dd6 /module/remote/json_converter.py | |
parent | removed unneeded stuff (diff) | |
download | pyload-6f8b5347dfa119a3df21f4ca8ba8c2b1537a726a.tar.xz |
first working parts of config api
Diffstat (limited to 'module/remote/json_converter.py')
-rw-r--r-- | module/remote/json_converter.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |