json-with-comments
JSON with Comments (jsonc) for Python
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no dependencies, installs easily, carries a permissive MIT license, and solves a real problem for anyone working with JSONC files or commented JSON. No known vulnerabilities. Install it if you need to parse or generate JSON with comments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel, no runtime dependencies, and actively maintained with a recent commit on 2026-08-07.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
last release 2024-12-10 (612 days) · last repo commit 2026-08-07 · 19 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,908 downloads/mo, #11,381 on PyPI
Alternatives
Verify before relying
pip install json-with-comments
import json_with_comments
result = json_with_comments.loads('{"key": "value" /* comment */}')
print(result)- Whether dump/dumps comment-addition features work with arbitrary Python objects or only specific types.
- Performance characteristics when parsing large JSON files with extensive comments.
- How the module's import name relates to the package name json-with-comments.
What it is and what it does
json-with-comments is a Python library that extends JSON parsing to handle comments and trailing commas—features common in configuration files but not part of the JSON specification. It provides load/loads functions that strip single-line (//) and block (/* */) comments before parsing, and dump/dumps functions that can add comments and trailing commas when serializing.
The package has no external dependencies and supports Python 3.7 through 3.13 on both CPython and PyPy. Use it when you need to read or write JSON-like configuration files that include comments, or when working with JSONC format commonly found in configuration tools.
Use it for
- Parse configuration files in JSONC format that include comments and trailing commas.
- Strip comments from JSON during a preprocessing step before passing to strict JSON parsers.
- Serialize Python objects to JSON while preserving or adding explanatory comments for readability.
- Handle hand-edited JSON files that developers have annotated with trailing commas and comments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no dependencies, installs easily, carries a permissive MIT license, and solves a real problem for anyone working with JSONC files or commented JSON. No known vulnerabilities. Install it if you need to parse or generate JSON with comments.
Install
json-with-comments on PyPI
Before you install
Low friction: pure Python wheel, no runtime dependencies, and actively maintained with a recent commit on 2026-08-07.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install json-with-comments
import json_with_comments
result = json_with_comments.loads('{"key": "value" /* comment */}')
print(result)
Verify before relying
- Whether dump/dumps comment-addition features work with arbitrary Python objects or only specific types.
- Performance characteristics when parsing large JSON files with extensive comments.
- How the module's import name relates to the package name json-with-comments.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 612 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,908 / month, #11,381 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: json_with_comments-1.2.10-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 › “json comments support”
- json-with-commentsParses and serializes JSON with support for single-line and block…
- json-fiveParses and serializes JSON5 (an extended JSON format with comments,…
- jsonc-parserParses JSON files with comments (.jsonc) and converts between .jsonc…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also json-tricks · jsonc-parser · jsoncomment · jstyleson · json5kit · JSON_minify · json-five · json-repair · json5 · ast-comments