PythonHub: post #50925 — TG.ME

jsonfold: Making Pretty-Printed JSON Compact and Readable in Python

jsonfold is a streaming post-filter that compacts pretty-printed JSON by folding small arrays and objects onto single lines while preserving existing serializers and custom encoders. It processes JSON incrementally without reparsing the document, keeping additional memory usage bounded while producing more compact, human-readable output for large JSON files.

https://medium.com/@yair.lenga/a-streaming-json-formatter-that-works-with-existing-serializers-eced220da37d
Medium
jsonfold: Making Pretty-Printed JSON Compact and Readable in Python
A Python streaming post-filter for compact, human-readable JSON with configurable formatting behavior.
August 21, 2026 107 2