koddr / json2csv

🚴 The parser can read given folder with JSON files, filtering and qualifying input data with intent & stop words dictionaries and save results to CSV files by given chunk size.
https://github.com/koddr/json2csv/wiki
Apache License 2.0
10 stars 0 forks source link

Sane defaults #6

Open jybp opened 4 months ago

jybp commented 4 months ago

:wave: Any reason we cannot make the program work in a default mode without having to setup special configuration? json2csv -i file.json -o file.csv?
It could throw an error if there's some unsupported corner cases that can't be solved but would be useful for some simple use cases, like:

[
        {
                "type": "foo1",
                "obj": {
                        "number": 123
                }
        },
        {
                "type": "foo2",
                "obj": {
                        "number": 456
                }
        }
]

Would just produce:

type,obj.number
foo1,123
foo2,456

I could work toward a PR.