rtyler / py-yajl

py-yajl provides Python bindings for the Yajl JSON encoder/decoder library
http://rtyler.github.com/py-yajl
74 stars 18 forks source link

Add simplejson-compatible parameters #4

Open alecf opened 14 years ago

alecf commented 14 years ago

In particular:

dumps needs at least:

not sure loads() needs anything.

mikeal commented 14 years ago

API compatibility with simplejson would be ideal:

http://docs.python.org/library/json.html#json.dump

alecf commented 14 years ago

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)

rtyler commented 14 years ago

Support for indent on dump/dumps added with SHA: adeeb98d86029e5a683b8a542885eafeec3299f4