jsonc-parser
A lightweight, native tool for parsing .jsonc files
What it is and what it does
jsonc-parser is a lightweight, zero-dependency Python module for reading and converting JSON files that contain comments (.jsonc format). It provides a static JsoncParser class with methods to parse .jsonc files or strings into Python dictionaries, stripping comments in the process, and to convert between .jsonc and .json file formats.
The package is designed for simple, straightforward use: import the class, call one of its parsing or conversion methods with a file path or string, and get back clean JSON data. It raises custom exceptions (FileError, FunctionParameterError, ParserError) to signal problems with file format, invalid parameters, or unparseable content. Because it has no runtime dependencies and a pure-Python implementation, installation is frictionless.
Use it for:
- Load configuration files that use JSONC format (with comments for documentation) into Python dicts for application startup.
- Convert legacy .jsonc config files to standard .json format for compatibility with JSON-only tools.
- Parse VSCode settings or other editor config files that use JSONC syntax natively.
- Strip comments from JSONC data during a build or preprocessing step before passing to downstream JSON consumers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses JSON files with comments (.jsonc) and converts between .jsonc and .json formats, stripping comments in the process.
Yes, if you need to parse JSONC files and are comfortable with an abandoned package. The code is simple, has no dependencies, and works reliably for its stated purpose on Python 3.5–3.9. However, do not expect bug fixes or updates for newer Python versions. If you require ongoing maintenance, consider an actively maintained alternative.
Install
jsonc-parser on PyPI
pip
pip install jsonc-parseruv
uv add jsonc-parserpoetry
poetry add jsonc-parserInstalling jsonc-parser
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last commit was 2022-01-11 and no releases since 2021-05-23. It remains marked Production/Stable and supports Python 3.5 through 3.9, but expect no maintenance for bugs or compatibility issues with newer Python versions.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute this package freely with minimal restrictions. No license-based barriers to adoption.
Quickstart
pip install jsonc-parser
from jsonc_parser.parser import JsoncParser
data = JsoncParser.parse_file("config.jsonc")
print(data)
Verify before relying
- Whether the parser correctly handles all valid JSONC syntax (trailing commas, single-line and block comments) in practice.
- Whether the package works reliably with Python versions beyond 3.9 despite being abandoned.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,909 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 283,286/month — #8,074 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsonc_parser-1.1.5-py3-none-any.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
json-with-commentsParses and serializes JSON with support for…
permissive · top 15,000 on PyPI
json5kitParses JSON5 (JSON with comments, trailing…
permissive · top 15,000 on PyPI
jsoncommentParses JSON with comments, multiline strings,…
permissive · top 15,000 on PyPI
strip-markdownConverts markdown text to plain text, removing…
permissive · top 15,000 on PyPI
ast-commentsExtends Python's built-in `ast` module to…
permissive · top 15,000 on PyPI
JSON_minifyMinifies JSON by removing whitespace and…
permissive · top 15,000 on PyPI
comment-parserExtracts comments from source code files across…
permissive · top 15,000 on PyPI
strip-ansiRemoves ANSI escape sequences (color codes,…
unclear · top 15,000 on PyPI
jstylesonParses JSON strings that contain…
permissive · top 15,000 on PyPI
pycomposefileParses and deserializes Docker Compose files…
permissive · top 5,000 on PyPI