JSON with Comments for Python
Project description
JSON with Comments for Python
Features
- Remove single line (
//
) and block comments (/* */
) - Remove trailing commas from arrays and objects
Usage
pip install json-with-comments
>>> import jsonc
>>> jsonc.loads("{// comment \n}")
{}
>>> jsonc.loads("{/* comment */}")
{}
>>> jsonc.loads('{"spam": "ham // egg" /* comment */}')
{'spam': 'ham // egg'}
>>> jsonc.loads('{"spam": /* comment */"ham /* egg */"}')
{'spam': 'ham /* egg */'}
And just like json
module
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for json_with_comments-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2249cebf2d7b7f597784f073df8c91f70fc70ec97902b57d0089a72db508a0c2 |
|
MD5 | f8a7b8ce311e3d1018682d8bd7219d1a |
|
BLAKE2b-256 | bd648e7a8971a48b44b738454145cd48937d5e8394188b52daf9ec68ee824a1e |