You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently sql-pipe only outputs CSV. Adding JSON output (--json) would make the tool much more useful in pipelines with jq, APIs, and modern CLI workflows.
Acceptance Criteria
--json flag outputs results as a JSON array of objects
Each row is an object with column names as keys
Numeric values are JSON numbers (not strings)
NULL values are represented as JSON null
Empty result set outputs []
--json is mutually exclusive with --delimiter / --tsv / --header
Description
Currently sql-pipe only outputs CSV. Adding JSON output (
--json) would make the tool much more useful in pipelines withjq, APIs, and modern CLI workflows.Acceptance Criteria
--jsonflag outputs results as a JSON array of objectsnull[]--jsonis mutually exclusive with--delimiter/--tsv/--headerNotes
echo "name,age\nAlice,30" | sql-pipe "SELECT * FROM stdin" --json→[{"name":"Alice","age":30}]std.jsoncan handle serialization--jsonhere first as a standalone flag; Multi-format input/output support (JSON, TSV, Parquet, etc.) #68 will later generalize it into--output-format jsonalongside other formats. Avoid designing a full format plugin system here — keep it simple.