Added
Output & Display
- Table output:
--format tableor-trenders results as aligned terminal tables with headers and separators - YAML output:
--format yamlrenders results as YAML (uses pyyaml if available, built-in fallback otherwise) --explainmode: shows parsed query breakdown (fields, conditions, grouping) and the generated jq filter--timeflag: prints parse/execute/format timing to stderr- Auto-detect stdin:
curl ... | jonq "select name"works without needing-as source
Query Language
- CASE/WHEN/THEN/ELSE/END: conditional expressions —
select case when age > 30 then "senior" else "junior" end as level - COALESCE: null fallback with nested function support —
select coalesce(nickname, name) as display ||operator: SQL-standard string concatenation —select first || ' ' || last as full_name- IS NULL / IS NOT NULL: null checks in conditions —
select * if email is not null - Type casting:
int(),float(),str()/string(),type() - Date/time functions:
todate(),fromdate(),date(),timestamp()with null-safe execution - Utility functions:
keys(),values(),trim(),ltrim(),rtrim(),tojson(),fromjson(),reverse(),sort(),unique(),flatten(),not_null(),to_entries(),from_entries()
Terminal UX
- Rich REPL: readline with persistent history (
~/.jonq_history) and tab completion for field names + keywords --followmode: stream NDJSON from stdin line-by-line —tail -f app.log | jonq --follow "select level, msg if level = 'error'"- Shell completions:
jonq --completions bash|zsh|fishgenerates completion scripts
Changed
- Version bump to 0.3.0
- Unified all function-name-to-jq-builtin mappings into a single
_FUNC_MAPconstant (eliminated 3 duplicate copies) - Expression-only queries now properly map over array elements instead of wrapping the whole input
- Path-explorer schema preview now shows nested JSON paths like
orders[].priceinstead of only shallow field listings - Reuse bounded sync and async jq worker pools for repeated identical filters
- Main streaming execution path now chunks root-array JSON in memory instead of splitting to temp files
- Repositioned README/package metadata around JSON exploration and extraction
Fixed
- Null-sensitive functions (
todate,tonumber) are now guarded against null input instead of crashing - Schema validator recognizes CASE expressions,
||operator, andcoalesce— no longer rejects them as unknown fields - Sync jq runtime errors that only write to
stderrno longer hang waiting onstdout - Async jq workers are cleaned up with their event loop, preventing leftover subprocess transport warnings
--followmode skips empty results instead of printing[]for non-matching lines