Skip to main content

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

Project description


JSON5 for Python

Documentation Status Build Status version pyversion Coverage


pip install json-five

This project requires Python 3.6 or newer.


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)


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.

Files for json-five, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size json_five-0.7.5-py3-none-any.whl (16.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size json-five-0.7.5.tar.gz (15.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page