json-five
A JSON5 parser that, among other features, supports round-trip preservation of comments
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries a permissive Apache license, and fills a genuine gap for JSON5 support in Python. It is well-suited for configuration parsing and round-trip editing. The abstract model API is marked unstable, so avoid it if you need long-term compatibility guarantees, but the core loads/dumps interface is stable as of v1.0.0.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; the import name is json5, not json_five.
- Low friction: pure Python wheel, two lightweight runtime dependencies (sly and regex), and active maintenance with a recent commit on 2026-07-27.
- Supports Python 3.8 and later versions.
License · maintenance · safety
Apache (permissive) — Apache License (permissive): you can use this package in commercial and private projects without restriction, though you must include a copy of the license and state any modifications.
last release 2024-06-11 (794 days) · last repo commit 2026-07-27 · 39 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 143,860 downloads/mo, #11,165 on PyPI
Alternatives
Verify before relying
pip install json-five
import json5
json_text = '{foo: "bar"} // comment'
data = json5.loads(json_text)
print(data)- Performance characteristics when parsing large JSON5 files or deeply nested structures.
- Stability guarantees for the abstract model API beyond v1.0.0 (marked subject to breaking changes in minor releases).
- Real-world usage patterns and community feedback on the model-based loader for linting and formatting workflows.
What it is and what it does
json-five is a JSON5 parser and serializer for Python that extends standard JSON handling to support JSON5—a relaxed JSON format allowing comments, unquoted object keys, trailing commas, and other conveniences. It provides two main interfaces: a simple loads/dumps API mirroring the standard library's json module, and a lower-level abstract model API for advanced use cases like linting, formatting, and custom serialization.
The package is designed to preserve non-data elements (comments, formatting, identifier styles) during round-trip operations, so you can load JSON5, modify it programmatically, and dump it back while keeping the original structure intact. It depends on sly and regex and is actively maintained with support for Python 3.8 through 3.11.
Use it for
- Load configuration files written in JSON5 format with comments and relaxed syntax into Python dictionaries.
- Build linters or formatters that parse JSON5 and preserve comments and formatting during output.
- Edit JSON5 documents programmatically using the abstract model API while maintaining original comments and structure.
- Tokenize JSON5 input for custom analysis or validation workflows.
- Work with JSON5 documents that use unquoted identifiers and other relaxed syntax features.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries a permissive Apache license, and fills a genuine gap for JSON5 support in Python. It is well-suited for configuration parsing and round-trip editing. The abstract model API is marked unstable, so avoid it if you need long-term compatibility guarantees, but the core loads/dumps interface is stable as of v1.0.0.
Install
json-five on PyPI
Before you install
Low friction: pure Python wheel, two lightweight runtime dependencies (sly and regex), and active maintenance with a recent commit on 2026-07-27. Supports Python 3.8 and later versions.
Requires Python 3.8 or later; the import name is json5, not json_five.
License in practice
Apache License (permissive): you can use this package in commercial and private projects without restriction, though you must include a copy of the license and state any modifications.
Quickstart
pip install json-five
import json5
json_text = '{foo: "bar"} // comment'
data = json5.loads(json_text)
print(data)
Verify before relying
- Performance characteristics when parsing large JSON5 files or deeply nested structures.
- Stability guarantees for the abstract model API beyond v1.0.0 (marked subject to breaking changes in minor releases).
- Real-world usage patterns and community feedback on the model-based loader for linting and formatting workflows.
Package facts
| License | Apache permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesslyregex |
| Maintenance | Actively maintained 794 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 143,860 / month, #11,165 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: json_five-1.1.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “json5 loader serializer”
- json-fiveParses and serializes JSON5 (an extended JSON format with comments,…
- pyjson5Parses and serializes JSON5 (a more lenient JSON variant) and…
- json5Parses and writes JSON5 data format, which extends JSON with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also json5 · json5kit · hjson · pyjson5 · json-with-comments · jsonable · partialjson · chompjs · jsons