root/dev/: json5rt-0.1.0 metadata and description

Simple index

json5rt — JSON5 round-trip library: load, edit, and save JSON5 files with comment preservation

author Tobias Hochgürtel
author_email Tobias Hochgürtel <tobias.hochguertel@googlemail.com>
description_content_type text/markdown
requires_dist
  • json-five>=1.1.0
requires_python >=3.13

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
json5rt-0.1.0-py3-none-any.whl
Size
7 KB
Type
Python Wheel
Python
3
  • Uploaded to root/dev by infra 2026-07-19 08:58:49
json5rt-0.1.0.tar.gz
Size
5 KB
Type
Source
  • Uploaded to root/dev by infra 2026-07-19 08:58:49

json5rt

JSON5 round-trip library: load, edit, and save JSON5 files with comment preservation.

Why?

Two PyPI packages — json5 and json-five — both use the import name json5, but their APIs are not interchangeable. Neither makes comment-preserving round-trip editing easy.

json5rt wraps json-five's model API in a clean, dict-like interface with a non-colliding import name (import json5rt).

Installation

uv add json5rt
# or
pip install json5rt

Quick start

import json5rt

# Load a JSON5 file with comments
doc = json5rt.load("config.json5")

# Edit like a dict
doc["port"] = 9090
doc["ssl"] = False
del doc["features"]

# Save back — comments preserved!
doc.save()

# Create from scratch
doc = json5rt.Document()
doc["host"] = "localhost"
doc["port"] = 8080
doc.save("new_config.json")  # valid JSON (double-quoted, no comments)

API

Functional

Document (dict-like)

License

MIT