shx
shx

Reputation: 1138

JSON object flattening to CSV one row

Has anyone ever been involved with exporting JSON like this one in my sample made only for the purposes of this conversation:

https://gist.github.com/slavisah/97b57a5826dc0b49ee22895035eb244a

It represents a list of material objects (wood, metal etc.) Requirement is that every material has to be written in one line of CSV file with all of it's behaviors and properties, and their sub-lists in relation to them in the same row. Every list is N sized.

My question is how to structure that CSV file for easiest export/import in my application? Maybe someone is familiar with Java library which is capable of doing things like this?

Thanks.

Upvotes: 0

Views: 1114

Answers (2)

httPants
httPants

Reputation: 2123

Some good libraries for working with csv files using java...

http://www.beanio.org/

http://super-csv.github.io/super-csv/index.html

Upvotes: 1

Younes Ouchala
Younes Ouchala

Reputation: 300

i suggest you to use Apache poi the Java API for Microsoft Documents : https://poi.apache.org/

Upvotes: 0

Related Questions