{"id":13477433,"url":"https://github.com/dmeranda/demjson","last_synced_at":"2025-10-21T20:48:36.848Z","repository":{"id":3543570,"uuid":"4603725","full_name":"dmeranda/demjson","owner":"dmeranda","description":"Python module for JSON data encoding, including jsonlint.  See the project Wiki here on Github.  Also read the README at the bottom of this page, or the project homepage at","archived":false,"fork":false,"pushed_at":"2020-05-03T22:50:55.000Z","size":300,"stargazers_count":301,"open_issues_count":18,"forks_count":76,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-30T10:40:31.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://deron.meranda.us/python/demjson/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmeranda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-09T00:09:35.000Z","updated_at":"2024-09-05T15:03:21.000Z","dependencies_parsed_at":"2022-07-21T12:32:28.848Z","dependency_job_id":null,"html_url":"https://github.com/dmeranda/demjson","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeranda%2Fdemjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeranda%2Fdemjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeranda%2Fdemjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmeranda%2Fdemjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmeranda","download_url":"https://codeload.github.com/dmeranda/demjson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791635,"owners_count":20672666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:42.730Z","updated_at":"2025-10-21T20:48:31.829Z","avatar_url":"https://github.com/dmeranda.png","language":"Python","readme":"demjson\n=======\n\n\u003cb\u003edemjson\u003c/b\u003e is a [Python language](http://python.org/) module for\nencoding, decoding, and syntax-checking [JSON](http://json.org/)\ndata.  It works under both Python 2 and Python 3.\n\nIt comes with a \u003cb\u003ejsonlint\u003c/b\u003e script which can be used to validate\nyour JSON documents for strict conformance to the JSON specification,\nand to detect potential data portability issues.  It can also reformat\nor pretty-print JSON documents; either by re-indenting or removing\nunnecessary whitespace.\n\n\nWhat's new\n==========\n\n\u003cb\u003eVersion 2.2.4\u003c/b\u003e fixes problem with jsonlint under Python 3 when\ntrying to reformat JSON (-f or -F options) and writing the output to\nstandard output.\n\n\u003cb\u003eVersion 2.2.3\u003c/b\u003e fixes incorrect return values from the \"jsonlint\"\ncommand.  Also fixes a minor problem with the included unit tests in\ncertain Python versions.\n\n\u003cb\u003eVersion 2.2.2\u003c/b\u003e fixes installation problems with certain Python 3\nversions prior to Python 3.4.  No other changes.\n\n\u003cb\u003eVersion 2.2.1\u003c/b\u003e adds an enhancement for HTML safety, and a few\nobscure bug fixes.\n\n\u003cb\u003eVersion 2.2\u003c/b\u003e fixes compatibility with Python 2.6 and\nnarrow-Unicode Pythons, fixes bugs with statistics, and adds many\nenhancements to the treatment of numbers and floating-point values.\n\n\u003cb\u003eVersion 2.0.1\u003c/b\u003e is a re-packaging of 2.0, after discovering\nproblems with incorrect checksums in the PyPI distribution of 2.0.  No\nchanges were made from 2.0.\n\n\u003cb\u003eVersion 2.0\u003c/b\u003e, released 2014-05-21, is a MAJOR new version with many\nchanges and improvements.\n\nVisit http://deron.meranda.us/python/demjson/ for complete details\nand documentation.  Additional documentation may also be found\nunder the \"docs/\" folder of the source.\n\nThe biggest changes in 2.0 include:\n\n  * Now works in Python 3; minimum version supported is Python 2.6\n  * Much improved reporting of errors and warnings\n  * Extensible with user-supplied hooks\n  * Handles many additional Python data types automatically\n  * Statistics\n\nThere are many more changes, as well as a small number of backwards\nincompatibilities.  Where possible these incompatibilities were kept\nto a minimum, however it is highly recommended that you read the\nchange notes thoroughly.\n\n\nExample use\n===========\n\nTo use demjson from within your Python programs:\n\n```python\n    \u003e\u003e\u003e import demjson\n\n    \u003e\u003e\u003e demjson.encode( ['one',42,True,None] )    # From Python to JSON\n    '[\"one\",42,true,null]'\n\n    \u003e\u003e\u003e demjson.decode( '[\"one\",42,true,null]' )  # From JSON to Python\n    ['one', 42, True, None]\n```\n\nTo check a JSON data file for errors or problems:\n\n```bash\n    $ jsonlint my.json\n\n    my.json:1:8: Error: Numbers may not have extra leading zeros: '017'\n       |  At line 1, column 8, offset 8\n    my.json:4:10: Warning: Object contains same key more than once: 'Name'\n       |  At line 4, column 10, offset 49\n       |  Object started at line 1, column 0, offset 0 (AT-START)\n    my.json:9:11: Warning: Integers larger than 53-bits are not portable\n       |  At line 9, column 11, offset 142\n    my.json: has errors\n```\n\n\nWhy use demjson?\n================\n\nI wrote demjson before Python had any JSON support in its standard\nlibrary.  If all you need is to be able to read or write JSON data,\nthen you may wish to just use what's built into Python.\n\nHowever demjson is extremely feature rich and is quite useful in\ncertain applications.  It is especially good at error checking\nJSON data and for being able to parse more of the JavaScript syntax\nthan is permitted by strict JSON.\n\nA few advantages of demjson are:\n\n * It works in old Python versions that don't have JSON built in;\n\n * It generally has better error handling and \"lint\" checking capabilities;\n\n * It will automatically use the Python Decimal (bigfloat) class\n   instead of a floating-point number whenever there might be an\n   overflow or loss of precision otherwise.\n\n * It can correctly deal with different Unicode encodings, including ASCII.\n   It will automatically adapt when to use \\u-escapes based on the encoding.\n\n * It generates more conservative JSON, such as escaping Unicode\n   format control characters or line terminators, which should improve\n   data portability.\n\n * In non-strict mode it can also deal with slightly non-conforming\n   input that is more JavaScript than JSON (such as allowing comments).\n\n * It supports a broader set of Python types during conversion.\n\n\nInstallation\n============\n\nTo install, type:\n\n```bash\n   python setup.py install\n```\n\nor optionally just copy the file \"demjson.py\" to whereever you want.\nSee \"docs/INSTALL.txt\" for more detailed instructions, including how\nto run the self-tests.\n\n\nMore information\n================\n\nSee the files under the \"docs\" subdirectory.  The module is also\nself-documented, so within the python interpreter type:\n\n```python\n    import demjson\n    help(demjson)\n```\n\nor from a shell command line:\n\n```bash\n    pydoc demjson\n```\n\nThe \"jsonlint\" command script which gets installed as part of demjson\nhas built-in usage instructions as well.  Just type:\n\n```bash\n   jsonlint --help\n```\n\nComplete documentation and additional information is also available on\nthe project homepage at http://deron.meranda.us/python/demjson/\n\nIt is also available on the Python Package Index (PyPI) at\nhttp://pypi.python.org/pypi/demjson/\n\n\nLicense\n=======\n\nLGPLv3 - See the included \"LICENSE.txt\" file.\n\nThis software is Free Software and is licensed under the terms of the\nGNU LGPL (GNU Lesser General Public License).  More information is\nfound at the top of the demjson.py source file and the included\nLICENSE.txt file.\n\nReleases prior to 1.4 were released under a different license, be\nsure to check the corresponding LICENSE.txt file included with them.\n\nThis software was written by Deron Meranda, http://deron.meranda.us/\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeranda%2Fdemjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmeranda%2Fdemjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmeranda%2Fdemjson/lists"}