Skip to main content

A JSON5 parser that, among other features, supports round-trip preservation of comments

Project description

json-five

JSON5 for Python

Documentation Status Build Status version pyversion Coverage

Installation

pip install json-five

This project requires Python 3.6 or newer.

Usage

NOTE: the import name is different from the install name (sorry, many were taken already)

>>> import json5
>>> json_text = """{ // This is a JSON5 comment
"foo": "bar" /* this is a JSON5 block
comment that can span lines /*
"bacon": "eggs"
}
"""
>>> json5.loads(json_text)
{"foo": "bar", "bacon": "eggs"}

See also the full documentation

Key features

  • Supports the JSON5 spec
  • Supports similar interfaces to stdlib json module
  • Supports round-trip preservation of comments
  • Tries to find all syntax errors at once (instead of raising on the first error encountered)

Status

This project is still in early stages of development. Check the issues page to see known bugs and unimplemented features.

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-five-0.6.5.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

json_five-0.6.5-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file json-five-0.6.5.tar.gz.

File metadata

  • Download URL: json-five-0.6.5.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for json-five-0.6.5.tar.gz
Algorithm Hash digest
SHA256 00e8a2d788d18a9616f91346722178709c6be75dc70a26bd88656486a8dd2801
MD5 682c8d2051fe6826c1664380250800cf
BLAKE2b-256 fddd22a611ab1a2c548107c99b8369826dfab7f7bfa00c04814c26decd973138

See more details on using hashes here.

Provenance

File details

Details for the file json_five-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: json_five-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for json_five-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ecea567b79f55cc36065bc0446e88796a09cb34fddde471adff3d9ada7adb0b4
MD5 e9f7809ecb45fb73f2dd4c51e0810199
BLAKE2b-256 22f9897a71cbdac8db13b812a10cf2300f49e3ca3944cf4ce21971ead05081bb

See more details on using hashes here.

Provenance

Supported by

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