jqlang / jq

Command-line JSON processor
https://jqlang.github.io/jq/
Other
30.49k stars 1.58k forks source link

Convert to JSON #1390

Open indolering opened 7 years ago

indolering commented 7 years ago

Sure, you can output CSV and TXT ... but can you convert CSV to JSON or TXT into an array?

Alanscut commented 4 years ago

@indolering jq is a lightweight and flexible command-line JSON processor.jq does not support processing csv data now.

pkoppstein commented 4 years ago

@Alanscut - Although it is true that jq has no built-in filter for parsing non-trivial CSV, jq is Turing-complete and in fact it's not difficult to write a PEG parser for CSV. The reason this is not commonly done is probably that in practice, it's more convenient to use a CSV-to-TSV converter in conjunction with jq since jq handles TSV well.