Summary
Extend gq's format support beyond JSON and YAML to include TOML (input + output) and CSV (output, possibly input).
Motivation
- TOML is the standard config format in the Rust, Python (pyproject.toml), and Go ecosystems. Supporting it rounds out the "config file processing" story and makes gq the universal config query tool.
- CSV output is the universal data interchange format for piping into spreadsheets, pandas, databases, and other tabular tools. It's extremely practical for data pipeline work.
Proposed Behavior
# TOML input, JSON output
gq -i toml -o json '{ package { name, version } }' < Cargo.toml
# JSON input, CSV output
gq -o csv '{ users { name, email } }' < data.json
# Cross-format conversion becomes a killer use case on its own
gq -i toml -o yaml < config.toml
Considerations
- TOML has datetime types that don't exist in JSON/YAML — how should these be represented?
- CSV output only makes sense for flat/tabular data — should gq auto-flatten nested structures or error?
- CSV input would require inferring types (string vs number) — worth the complexity?
- Existing
DataFormat enum in crates/core/src/data/format.rs would need to be extended
Summary
Extend gq's format support beyond JSON and YAML to include TOML (input + output) and CSV (output, possibly input).
Motivation
Proposed Behavior
Considerations
DataFormatenum incrates/core/src/data/format.rswould need to be extended