summaryrefslogtreecommitdiffstats
path: root/pyload/remote/json_converter.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/remote/json_converter.py')
-rw-r--r--pyload/remote/json_converter.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pyload/remote/json_converter.py b/pyload/remote/json_converter.py
index a7a0645ce..b4e57c4a0 100644
--- a/pyload/remote/json_converter.py
+++ b/pyload/remote/json_converter.py
@@ -59,6 +59,17 @@ def dumps(*args, **kwargs):
return json.dumps(*args, **kwargs)
+def dump(*args, **kwargs):
+ if 'compact' in kwargs and kwargs['compact']:
+ kwargs['cls'] = BaseEncoderCompact
+ del kwargs['compact']
+ else:
+ kwargs['cls'] = BaseEncoder
+
+ kwargs['separators'] = separators
+ return json.dump(*args, **kwargs)
+
+
def loads(*args, **kwargs):
kwargs['object_hook'] = convert_obj
return json.loads(*args, **kwargs) \ No newline at end of file