NEWS: (June 2014) Version 2.2.2 was released!

Read about all the changes. (Notes for downstream package maintainers.)

About demjson and jsonlint

The demjson package is a comprehensive Python language library to read and write JSON; the popular language-independent data format standard.

It includes a command tool, jsonlint, that allows you to easily check and validate any JSON document, and spot any potential data portability issues. It can also reformat and re-indent a JSON document to make it easier to read.

Quick example (code)

>>> import demjson

>>> demjson.encode( ['one',42,True,None] )    # From Python to JSON
'["one",42,true,null]'

>>> demjson.decode( '["one",42,true,null]' )  # From JSON to Python
['one', 42, True, None]

Quick example (jsonlint)

$ jsonlint my.json

my.json:1:8: Error: Numbers may not have extra leading zeros: '017'
   |  At line 1, column 8, offset 8
my.json:4:10: Warning: Object contains same key more than once: 'Name'
   |  At line 4, column 10, offset 49
   |  Object started at line 1, column 0, offset 0 (AT-START)
my.json:9:11: Warning: Integers larger than 53-bits are not portable
   |  At line 9, column 11, offset 142
my.json: has errors

License

See the demjson license page for complete details...

This is Free Software, licensed under the terms of the GNU LGPL version 3 or later.

This basically means you are completely free to use it however you want (even in proprietary systems) for any purpose. However, if you make modifications to it and you redistribute it to others, then you must make your modifications to this software public and also release it under the same license terms. Read the license text for all the details.

Older versions may have been released under a different license; be sure to read the LICENSE.txt file that is included in each package.