--- id: json5 version: "0.15.0" license: Files: Everything except for the benchmarks/*.json files. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1.… (full text in the JSON record) license_treatment: permissive maintenance: active --- # json5 — A Python implementation of the JSON5 data format. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install json5 uv add json5 poetry add json5 ## Description # pyjson5 A Python implementation of the JSON5 data format. [JSON5](https://json5.org) extends the [JSON](http://www.json.org) 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](https://docs.python.org/library/json.html) package for ease of use. There is one notable difference from the JSON api: the `load()` and `loads()` methods support optionally checking for (and rejecting) duplicate object keys; pass `allow_duplicate_keys=False` to do so (duplicates are allowed by default). 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... ## AI interpretation — verify before relying Parses and serializes JSON5, a relaxed JSON format that allows comments, unquoted keys, trailing commas, and single-quoted strings for use as a configuration language. Verdict: A well-maintained, permissively licensed JSON5 implementation suitable for parsing relaxed JSON in configuration workflows. Zero dependencies and broad Python version support make it easy to integrate. However, its documented performance limitation (200–6000× slower than json) means it should be reserved for configuration files and non-performance-critical use cases. [View on SkillFed](https://skillfed.io/packages/json5) · [View on PyPI](https://pypi.org/project/json5/)