Skip to content

Commit 30a83e5

Browse files
jjmaksoudKangOl
authored andcommitted
[IMP] json: remove extra spaces
To make the output of json and orjson dumps uniform and interchangeable, we need to remove the extra spaces from the standard json string as orjson does not provide the capability to add the spaces. Unit test assertions have been updated to not have extra spaces with odoo/upgrade#6662 closes #155 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 817db51 commit 30a83e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import json
77

88
def dumps(value, sort_keys=False):
9-
return json.dumps(value, sort_keys=sort_keys)
9+
return json.dumps(value, sort_keys=sort_keys, separators=(",", ":"))
1010

1111
def loads(value):
1212
return json.loads(value)

0 commit comments

Comments
 (0)