Skip to main content

A Python implementation of the JSON5 data format.

Project description

pyjson5

A Python implementation of the JSON5 data format.

JSON5 extends the JSON data interchange format to make it slightly more usable as a configuration language:

  • JavaScript-style comments (both single and multi-line) are legal.

  • Object keys may be unquoted if they are legal ECMAScript identifiers

  • Objects and arrays may end with trailing commas.

  • Strings can be single-quoted, and multi-line string literals are allowed.

There are a few other more minor extensions to JSON; see the above page for the full details.

This project implements a reader and writer implementation for Python; where possible, it mirrors the standard Python JSON API package for ease of use.

This is an early release. It has been reasonably well-tested, but it is SLOW. It can be 1000-6000x slower than the C-optimized JSON module, and is 200x slower (or more) than the pure Python JSON module.

Known issues

  • The cls keyword argument that json.load()/json.loads() accepts to specify a custom subclass of JSONDecoder is not and will not be supported, because this implementation uses a completely different approach and doesn’t have anything like the JSONDecoder and JSONEncoder classes.

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

json5-0.5.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

json5-0.5.1-py2.py3-none-any.whl (22.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file json5-0.5.1.tar.gz.

File metadata

  • Download URL: json5-0.5.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for json5-0.5.1.tar.gz
Algorithm Hash digest
SHA256 0be44898262b2a32d8c9a1714dbb6e8c034774fc4166f770302012161b771e84
MD5 b9bba4e2006cd578b1deb36b4ead8d7c
BLAKE2b-256 433e15d2b4c03f16817f9ade4e8d0542f2040634da26bb7214d2e8e3158b85a8

See more details on using hashes here.

File details

Details for the file json5-0.5.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for json5-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f3f982e0c762e368bd5c87b2d67e54af4b7d21764f60bbec50ec54007491953
MD5 fd3a8155f3f5f51d486f4631bd6f34a9
BLAKE2b-256 4bcf050247dcd8000a8f2413d7932281991acba5bb72270f5f39d0a22c9b3074

See more details on using hashes here.

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