Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

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

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page