Bob Ippolito (@etrepum) on Haskell, Python, Erlang, JavaScript, etc.
«

simplejson 1.1

»

simplejson is a simple, fast, complete, correct and extensible JSON encoder/decoder for Python 2.3+. It is pure Python code with no dependencies. It's now the recommended module for Python use by JSON.org (replacing json-py).

simplejson was previously named simple_json, but was renamed to comply with PEP 8 module naming guidelines.

simplejson 1.1 has a much bigger test suite, a full set of documentation and a couple new features.

  • The encoder and decoder have been extended to understand NaN, Infinity, and -Infinity (but this can be turned off via allow_nan=False for strict JSON compliance)
  • The decoder's scanner has been fixed so that it no longer accepts invalid JSON documents
  • The decoder now reports line and column information as well as character numbers for easier debugging
  • The encoder now has a circular reference checker, which can be optionally disabled with check_circular=False
  • dump, dumps, load, loads now accept an optional cls kwarg to use an alternate JSONEncoder or JSONDecoder class for convenience.
  • The read/write compatibility shim for json-py now have deprecation warnings