Overview
I had a need to parse only the beginning preview of a set of large JSON files (e.g. safetensors). I wanted the ability to parse this JSON, to:
- Know that everything up to the cut off was valid JSON.
- Be able to process the JSON for beautification or header processing.
Alas, most json libraries do want the whole JSON. After a bit of work, I was able to get it going with ijson.