When using a custom json.JSONEncoder, the output ignores the separators argument.
Example: Using separators with no spaces to minify file size.
import json, jsonstreams
def encoder(*args, **kwargs):
return json.JSONEncoder(separators=(',', ':'))
with jsonstreams.Stream(jsonstreams.Type.object, 'out.json', encoder=encoder) as s:
s.write('key', 'value')
Observed out.json
Expected out.json
When using a custom
json.JSONEncoder, the output ignores theseparatorsargument.Example: Using separators with no spaces to minify file size.
Observed
out.jsonExpected
out.json