Formatted JSON output
- class CompactEncoder(*args, **kwargs)[source]
Bases:
JSONEncoderJSONEncoder can be used as cls argument to json.dump and json.dumps. It creates formatted JSON strings, with indentation that are more compact than the dafault formatting from json module. The main difference is that the lists of primitives are not split into multiple lines.