Hacker News new | ask | show | jobs
by tylerneylon 771 days ago
Not sure if this is a common problem, but I built a tool to help me quickly understand the main schema, and where most of the data is, for a new JSON file given to me. It makes the assumption that sometimes peer elements in a list will have the same structure (eg they'll be objects with similar sets of keys). If that's true, it learns the structure of the file, prints out the heaviest _aggregated_ path (meaning it thinks in terms of a directory-like structure), as well as giving you various size-per-path hints to help introduce yourself to the JSON file:

https://github.com/tylerneylon/json_profile

1 comments

Looks quite useful, thanks! Though when you said that the tool helps you understand the main schema, I thought it would output an outline of the json tree. But it doesn't seem to do that, unless there's an option for it?