json_parser
An efficient JSON parser written in Python.
Installation
Install it via pip:
pip install json-parser
Usage
import json_parser
data = json_parser.parse('{"value": 42}')
print(data['value']) # 42
Benchmarks
Running it on this 25MB JSON file gave the following results:
>>> with open('large-file.json') as f:
... t = time.time()
... x = json.load(f)
... t = time.time() - t
... print(t, 'seconds')
...
0.6405608654022217 seconds
>>> with open('large-file.json') as f:
... t = time.time()
... y = json_parser.parse(f.read())
... t = time.time() - t
... print(t, 'seconds')
...
22.286625385284424 seconds
>>> x == y
True
So, it's about 34x slower than the builtin json.
Which, is par for the course when it comes to pure python.
Testing
Clone the app and run the following:
pip install -e '.[dev]'
pytest
Metadata
Release files for json-parser 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| json_parser-1.2.0.tar.gz | 9.1 kB | Without provenance | Details for json_parser-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| json_parser-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for json_parser-1.2.0-py3-none-any.whl |
Total release size: 19.3 kB
Release files / json_parser-1.2.0.tar.gz
| Download URL | json_parser-1.2.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7d5ade07d18bbffadc34c3ccb99ed018523d4ebebbbf452226ef85b57df5b85
|
|
BLAKE2b-256 checksum How to use checksums |
245b5e89f17131c145aa2c2359faadf8d9165e4d6a69bb2508e7637162b3f824
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|
Release files / json_parser-1.2.0-py3-none-any.whl
| Download URL | json_parser-1.2.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cba9a2da5c7514f485a408b05ad5272ba4d35db1a0188122163e6a0551d4ecfd
|
|
BLAKE2b-256 checksum How to use checksums |
1048f4ae13abccddfa5eadb7332477f5a971cfd46f61bbeebbb7394a1bbf8460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|
Security for json-parser 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.