JSON with Comments (jsonc) for Python
Project description
JSON with Comments for Python
Features
load(),loads()- Remove single line (
//) and block comments (/* */) - Remove trailing commas from arrays and objects
- Remove single line (
dump(),dumps()- Add comments
- Add trailing commas
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file json_with_comments-1.2.10.tar.gz.
File metadata
- Download URL: json_with_comments-1.2.10.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0020b321cf6c80963c85f95ce985e71332f1797ed49abfd1cd675b3bdee24a28
|
|
| MD5 |
cb4aab307eb8256bbc6aeb50e5cf904c
|
|
| BLAKE2b-256 |
bf6d638e8adbb2b92bb0803c092dd8ae6482945961c8545fc7e2f21c48233928
|
Provenance
The following attestation bundles were made for json_with_comments-1.2.10.tar.gz:
Publisher:
publish.yml on n-takumasa/json-with-comments
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_with_comments-1.2.10.tar.gz -
Subject digest:
0020b321cf6c80963c85f95ce985e71332f1797ed49abfd1cd675b3bdee24a28 - Sigstore transparency entry: 154369718
- Sigstore integration time:
-
Permalink:
n-takumasa/json-with-comments@17132c347c745e5a55158edaf6e3b937d45f2254 -
Branch / Tag:
refs/tags/v1.2.10 - Owner: https://github.com/n-takumasa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17132c347c745e5a55158edaf6e3b937d45f2254 -
Trigger Event:
push
-
Statement type:
File details
Details for the file json_with_comments-1.2.10-py3-none-any.whl.
File metadata
- Download URL: json_with_comments-1.2.10-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7989c2577b1f8cbba735209f8d388d21017feb42ef30c29c230040f86b42700
|
|
| MD5 |
7c78bd102578609bb70b4647d715cb16
|
|
| BLAKE2b-256 |
008af67dadb0648f00ac2249d3ef32532f0d5a2e72016f8426290ce6fe575870
|
Provenance
The following attestation bundles were made for json_with_comments-1.2.10-py3-none-any.whl:
Publisher:
publish.yml on n-takumasa/json-with-comments
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_with_comments-1.2.10-py3-none-any.whl -
Subject digest:
d7989c2577b1f8cbba735209f8d388d21017feb42ef30c29c230040f86b42700 - Sigstore transparency entry: 154369720
- Sigstore integration time:
-
Permalink:
n-takumasa/json-with-comments@17132c347c745e5a55158edaf6e3b937d45f2254 -
Branch / Tag:
refs/tags/v1.2.10 - Owner: https://github.com/n-takumasa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17132c347c745e5a55158edaf6e3b937d45f2254 -
Trigger Event:
push
-
Statement type: