Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Convert from json to (flattened) csv #3
Some systems won't accept json as an input. I've tried several json-to-csv tools and none of then handle nested json arrays in a meaningful manner, creating rows only for the first level instead of doing it bottom-to-top. Consider:
An array with an arbitrary number of elements that in turn can have and arbitrary number of arrays, recursively.
Each leave becomes a csv row with all it's ancestor's fields. The example above would result in four rows with the following fields:
It may be necessary to limit the allowed tree's depth to preserve resources.
I've implemented JSON to CSV and a flattening option. Have a look:
Let me know if this is what you had in mind.