jsoncomment
A wrapper to JSON parsers allowing comments, multiline strings and trailing commas
Decision gist · record as of 2026-08-14
No. While the package is permissive (MIT) and has low install friction, it is abandoned (last release 2019-02-08) with no active maintenance. For new projects, use a maintained alternative. For legacy systems already using jsoncomment, it may continue to work on Python 3.3+, but you assume all maintenance risk and will receive no security updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.3 or later.
- Comments must be preceded only by whitespace on the same line; inline comments are not supported.
- Low install friction as a pure-Python wheel with one runtime dependency (json-spec).
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, making it safe from a licensing perspective.
last release 2019-02-08 (2744 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 136,149 downloads/mo, #11,403 on PyPI
Alternatives
Verify before relying
pip install jsoncomment
from jsoncomment import JsonComment
json = JsonComment()
json_obj = json.loads('[1, 2, 3,] # trailing comma')- Whether json-spec dependency is actively maintained and compatible with current Python versions
- Real-world compatibility with modern JSON parsers beyond the standard library json module
- Whether the package works reliably with modern Python versions despite being marked abandoned since 2019-02-08
What it is and what it does
jsoncomment is a preprocessor wrapper that extends any JSON parser (including the standard library's json module) to accept comments, multiline strings, and trailing commas—features that standard JSON does not allow. It works by stripping comments and normalizing syntax before passing the cleaned input to your chosen JSON parser's load() or loads() methods.
The package supports single-line comments using #, ;, or //, multiline comments with /* */, and triple-quoted multiline strings similar to Python. It also provides convenience methods like loadf() to load JSON files with a fallback default value and dumpf() to save JSON with indentation. However, the project has been abandoned since 2019-02-08 with no active maintenance, which means it will not receive updates for compatibility with newer Python versions or security issues.
Use it for
- Load configuration files that contain comments and trailing commas without manual preprocessing
- Parse JSON-like data formats in legacy systems or custom file formats that tolerate relaxed JSON syntax
- Preprocess JSON strings in scripts where you want to add inline documentation without breaking parsing
- Work with existing codebases already using jsoncomment where replacement is not feasible
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
While the package is permissive (MIT) and has low install friction, it is abandoned (last release 2019-02-08) with no active maintenance. For new projects, use a maintained alternative. For legacy systems already using jsoncomment, it may continue to work on Python 3.3+, but you assume all maintenance risk and will receive no security updates.
Install
jsoncomment on PyPI
Before you install
Low install friction as a pure-Python wheel with one runtime dependency (json-spec). However, the package is abandoned—last release was 2019-02-08. No active maintenance or security updates.
Requires Python 3.3 or later. Comments must be preceded only by whitespace on the same line; inline comments are not supported.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, making it safe from a licensing perspective.
Quickstart
pip install jsoncomment
from jsoncomment import JsonComment
json = JsonComment()
json_obj = json.loads('[1, 2, 3,] # trailing comma')
Verify before relying
- Whether json-spec dependency is actively maintained and compatible with current Python versions
- Real-world compatibility with modern JSON parsers beyond the standard library json module
- Whether the package works reliably with modern Python versions despite being marked abandoned since 2019-02-08
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.3 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagejson-spec |
| Maintenance | Abandoned 2,744 days since the last release |
| First released | |
| Downloads | 136,149 / month, #11,403 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: End Users/DesktopLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.3Topic :: Software Development :: Pre-processorsTopic :: Text Editors :: Text Processing |
Evidence: jsoncomment-0.4.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 › “json preprocessor”
- jsoncommentParses JSON with comments, multiline strings, and trailing commas by…
- jstylesonParses JSON strings that contain JavaScript-style comments…
- pcppA pure Python implementation of a C99 preprocessor that can…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Editors packages
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Jedi provides static analysis, autocompletion, and refactoring for Python code, typically integrated into editors and IDEs through a simple API.
Parso is a Python parser that recovers from syntax errors and parses code across multiple Python versions, returning an analyzable syntax tree and reporting multiple errors in a single pass.
Install it if you need to parse Python code programmatically, especially when error recovery or multi-version support matters.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
Trafilatura extracts main text, metadata, and structured content from web pages and HTML, converting raw HTML into clean, usable data in multiple output formats.
Finds multiple keyword strings in text efficiently using an Aho-Corasick automaton, built and pickled for reuse.
See also comment-parser · jc · json-with-comments · jstyleson · json5kit · commented-configparser · json-repair · add-trailing-comma · jsonc-parser · poyo