Open alecf opened 14 years ago
API compatibility with simplejson would be ideal:
A clarification on indent:
indent=None (the default) means "dont' indent, make JSON the minimum size (i.e. no extra spaces) indent=N, where N is an integer means "use N spaces to indent, with newlines, etc" indent=0 means "no indenting, but still use newlines" (i.e. consistent with N)
Support for indent
on dump/dumps added with SHA: adeeb98d86029e5a683b8a542885eafeec3299f4
In particular:
dumps needs at least:
indent
which is a number of spaces to indentsort_keys
- whether to sort dict keys in the output (for predictable serialization)default
- which is a function that gets called on anything that's not normally json-encodable, return value is used as the string valuenot sure loads() needs anything.