Takes data, that is almost in json format, and converts it to json data. Thus prepare the data for a json parser.
Project description
JSON Corrector
Takes data, that is almost in json format, and converts it to json data.
Thus prepare the data for a json parser.
Limitations
Not all data types that are valid as values, according to json.org, are yet handled correctly.
- String: :white_check_mark:
- Boolean: :white_check_mark:
- Object: :white_check_mark:
- Array: :white_check_mark:
- Numbers: :clock430:
- null: :clock430:
Requirements
- Python 3.x >= 3.8
Install (Windows & Linux)
pip install json-corrector
Use (Windows & Linux)
Using entry point script
echo "{'key1':'val1',key2: val2, 'key3': val3,key4: 'val4', key5: { 'key6': val6 },key7: 'val7: val7,val7'}" | jc
jc "{'key1':'val1',key2: val2, 'key3': val3,key4: 'val4', key5: { 'key6': val6 },key7: 'val7: val7,val7'}"
Using runpy
echo "{'key1':'val1',key2: val2, 'key3': val3,key4: 'val4', key5: { 'key6': val6 },key7: 'val7: val7,val7'}" | py -m json_corrector.jc
py -m json_corrector.jc "{'key1':'val1',key2: val2, 'key3': val3,key4: 'val4', key5: { 'key6': val6 },key7: 'val7: val7,val7'}"
Build
Firstly increase the version in pyproject.toml.
Windows
Checkout repo
git clone https://github.com/tschenkelz/json_corrector.git
cd json_corrector
Optional Cleanup
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue .\dist\*
Optional Specify CA certs
$Env:REQUESTS_CA_BUNDLE = "path\to\ca.pem"
Build & upload
py -m pip install --upgrade pip
py -m pip install --upgrade build
py -m build
py -m pip install --upgrade twine
twine upload dist/*
Project details
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_corrector-3.0.4.tar.gz.
File metadata
- Download URL: json_corrector-3.0.4.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98b4a9b99cb24a8f619767837127b5c5620938b32d06d080dc0369e0ad7fd2b8
|
|
| MD5 |
5ccc4ba4d10b6e569f0ef8eec62fad4b
|
|
| BLAKE2b-256 |
ccd223a3741b15650ce2dc4f550ea1bb55cc164a7c314a42c82e1f4c8119da36
|
Provenance
The following attestation bundles were made for json_corrector-3.0.4.tar.gz:
Publisher:
python-publish.yml on tschenkelz/json_corrector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_corrector-3.0.4.tar.gz -
Subject digest:
98b4a9b99cb24a8f619767837127b5c5620938b32d06d080dc0369e0ad7fd2b8 - Sigstore transparency entry: 179179186
- Sigstore integration time:
-
Permalink:
tschenkelz/json_corrector@b0519aaaa679df72f6bc782df3f0162d30a89056 -
Branch / Tag:
refs/tags/3.0.4 - Owner: https://github.com/tschenkelz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b0519aaaa679df72f6bc782df3f0162d30a89056 -
Trigger Event:
release
-
Statement type:
File details
Details for the file json_corrector-3.0.4-py3-none-any.whl.
File metadata
- Download URL: json_corrector-3.0.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87611a1e4765423cee7f58ac4b64a2c3748a76b7f2e55e220795ae2ec13f0a75
|
|
| MD5 |
78d47253f8245c37e711ad6098f6f9d7
|
|
| BLAKE2b-256 |
69e3322d0deb230311325bbf39e7540eb3db48f3adb85137497c6212ace42e26
|
Provenance
The following attestation bundles were made for json_corrector-3.0.4-py3-none-any.whl:
Publisher:
python-publish.yml on tschenkelz/json_corrector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
json_corrector-3.0.4-py3-none-any.whl -
Subject digest:
87611a1e4765423cee7f58ac4b64a2c3748a76b7f2e55e220795ae2ec13f0a75 - Sigstore transparency entry: 179179188
- Sigstore integration time:
-
Permalink:
tschenkelz/json_corrector@b0519aaaa679df72f6bc782df3f0162d30a89056 -
Branch / Tag:
refs/tags/3.0.4 - Owner: https://github.com/tschenkelz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b0519aaaa679df72f6bc782df3f0162d30a89056 -
Trigger Event:
release
-
Statement type: