$npx skillfedfor your agent

json5

A Python implementation of the JSON5 data format.

With conditionsPyPI Text ProcessingReleased Jun 202656.8M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — json5-0.15.0-py3-none-any.whl
v0.15.0 · released 2026-06-19 · Python >=3.8.0

Yes, if you need to parse or generate JSON5 documents and can tolerate the performance penalty. The package is permissively licensed, has no dependencies, and is actively maintained. Install it only if JSON5 syntax is a genuine requirement; for standard JSON, use the built-in json module instead.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • None; the package has no runtime dependencies and requires only Python 3.8 or later.
  • Low install friction with no runtime dependencies.
  • Actively maintained as of June 2026 with recent bug fixes and dependency updates.

License · maintenance · safety

permissive license (permissive) — Licensed under Apache 2.0 (permissive). Benchmark files carry separate MIT licenses. No restrictions on commercial use or modification.

last release 2026-06-19 (56 days) · last repo commit 2026-06-24 · 283 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 56,835,055 downloads/mo, #524 on PyPI

Verify before relying

import json5

# Parse JSON5 with comments and unquoted keys
data = json5.loads("""{
  // This is a comment
  name: 'example',
  items: [1, 2, 3,],  // trailing comma
}""")

# Write back as JSON5
output = json5.dumps(data, indent=2)
  • Whether performance penalty is acceptable for your use case (documented as 1000–6000x slower than standard JSON).
  • Compatibility with custom JSONDecoder/JSONEncoder subclasses (not supported; see known issues).
Same gist for agents: .md · .json

What it is and what it does

json5 is a Python implementation of the JSON5 data format, which relaxes JSON syntax to make it more usable as a configuration language. It reads and writes JSON5 documents with support for JavaScript-style comments (single and multi-line), unquoted object keys, trailing commas in objects and arrays, and single-quoted or multi-line strings. The API mirrors Python's standard json module for ease of use, with one notable addition: an optional allow_duplicate_keys parameter to reject duplicate object keys.

The package has no runtime dependencies and supports Python 3.8 and later. It is actively maintained but carries a significant performance trade-off: it is documented as 1000–6000x slower than the C-optimized JSON module and 200x slower than pure Python json. This makes it suitable for configuration parsing and one-off data interchange tasks, but not for high-throughput or latency-sensitive workloads.

Use it for

  • Parse configuration files that use JSON5 syntax with comments and relaxed formatting.
  • Convert JSON5 documents to Python objects and back, maintaining JSON5 syntax on write.
  • Validate and reject JSON5 documents with duplicate object keys using allow_duplicate_keys=False.
  • Migrate from JavaScript-based JSON5 tooling to Python while preserving JSON5 document semantics.
  • Encode custom Python objects to JSON5 using the JSON5Encoder class with custom encode() methods.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to parse or generate JSON5 documents and can tolerate the performance penalty.

The package is permissively licensed, has no dependencies, and is actively maintained. Install it only if JSON5 syntax is a genuine requirement; for standard JSON, use the built-in json module instead.

Install

json5 on PyPI

Before you install

Low install friction with no runtime dependencies. Actively maintained as of June 2026 with recent bug fixes and dependency updates. Performance is a documented limitation: the package is 1000–6000x slower than the C-optimized JSON module.

None; the package has no runtime dependencies and requires only Python 3.8 or later.

License in practice

Licensed under Apache 2.0 (permissive). Benchmark files carry separate MIT licenses. No restrictions on commercial use or modification.

Quickstart

import json5

# Parse JSON5 with comments and unquoted keys
data = json5.loads("""{
  // This is a comment
  name: 'example',
  items: [1, 2, 3,],  // trailing comma
}""")

# Write back as JSON5
output = json5.dumps(data, indent=2)

Verify before relying

  • Whether performance penalty is acceptable for your use case (documented as 1000–6000x slower than standard JSON).
  • Compatibility with custom JSONDecoder/JSONEncoder subclasses (not supported; see known issues).

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8.0
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 56 days since the last release
Last repo commit
First released
Downloads56,835,055 / month, #524 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: json5-0.15.0-py3-none-any.whl

Tags

Capabilities
json5 parserparse json5 formatjson with commentsconfiguration file formatjson5 serializerrelaxed json parsingjson5 encoder decoder
Topics
json5configuration-formatdata-interchange
PyPI keywords
json5

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 › “parse json5 format”

  • json5Parses and writes JSON5 data format, which extends JSON with…
  • pyjson5Parses and serializes JSON5 (a more lenient JSON variant) and…
  • json-fiveParses and serializes JSON5 (an extended JSON format with comments,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

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.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

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.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

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.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

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.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

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.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also chompjs · json-five · json5kit · perky · pyjson5 · jsonconversion · partialjson · json-with-comments · jstyleson · ndjson