-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority:mediumShould be done soonShould be done soonsize:mMedium — 4 to 8 hoursMedium — 4 to 8 hoursstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:featureNew functionalityNew functionality
Description
Description
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
-
--jsonflag 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
[] -
--jsonis mutually exclusive with--delimiter/--tsv/--header - Man page and README updated
Notes
- Example:
echo "name,age\nAlice,30" | sql-pipe "SELECT * FROM stdin" --json→[{"name":"Alice","age":30}] - Zig's
std.jsoncan handle serialization - Complements the existing CSV/TSV output modes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:mediumShould be done soonShould be done soonsize:mMedium — 4 to 8 hoursMedium — 4 to 8 hoursstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:featureNew functionalityNew functionality