Skip to main content

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

json_corrector-3.0.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_corrector-3.0.4-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for json_corrector-3.0.4.tar.gz
Algorithm Hash digest
SHA256 98b4a9b99cb24a8f619767837127b5c5620938b32d06d080dc0369e0ad7fd2b8
MD5 5ccc4ba4d10b6e569f0ef8eec62fad4b
BLAKE2b-256 ccd223a3741b15650ce2dc4f550ea1bb55cc164a7c314a42c82e1f4c8119da36

See more details on using hashes here.

Provenance

The following attestation bundles were made for json_corrector-3.0.4.tar.gz:

Publisher: python-publish.yml on tschenkelz/json_corrector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for json_corrector-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 87611a1e4765423cee7f58ac4b64a2c3748a76b7f2e55e220795ae2ec13f0a75
MD5 78d47253f8245c37e711ad6098f6f9d7
BLAKE2b-256 69e3322d0deb230311325bbf39e7540eb3db48f3adb85137497c6212ace42e26

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page