I wrote a small Python module called jsonfold, post processing the output of json.dump() (and other similar serializers). It will selectively fold short lines and small containers while still keeping the JSON readable.
It works as a lightweight wrapper for file-like objects, and it does NOT re-parse the JSON stream, so it can handle large documents with fixed memory usage and linear processing time.
Sample output (line width, level of folding, ... can be customized):
{ "a": { "b": { "c": "abc" } }, "x": { "y": { "z": "xyz" } } }