skillfed

jsonc-parser

A lightweight, native tool for parsing .jsonc files

jsonc-parser v1.1.5 283.3K downloads/30d#8,074 on PyPI17
Permissive license MIT Abandoned released

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-parser

uv

uv add jsonc-parser

poetry

poetry add jsonc-parser

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

parse json with commentsjsonc parserjson comments supportconvert jsonc to jsonstrip json commentsjsonc file parsingjson comment removal
json-parsingconfig-filescomment-stripping

More Text Processing packages