Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a small script to convert CSVs to JSON strictly to use jq on the output. Querying things like your GCP bill with jq is quite enjoyable.

gojq is also nice. I work with a lot of structured logs and wrapped jq with a little bit of format-understanding and output sugar to make looking at and analyzing such logs an enjoyable experience: https://github.com/jrockway/json-logs



> I wrote a small script to convert CSVs to JSON strictly to use jq on the output

Note that you can use jq to consume simple CSVs (and produce them) without anything else. There’s an entry in the cookbook wiki https://github.com/stedolan/jq/wiki/Cookbook#convert-a-csv-f... - I posted some usage examples a few months back https://news.ycombinator.com/item?id=27379423


Miller Csv can process json in record format and has a much saner DSL in my experience.

https://github.com/johnkerl/miller




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: