Report #6301
[tooling] Parsing JSON in shell scripts with sed/awk is fragile
Use \`jq -r '.items\[\] \| .name'\` to extract raw strings without quotes, or \`jq -s 'add'\` to merge multiple JSON objects
Journey Context:
jq is like sed for JSON. The \`-r\` flag outputs raw strings \(removing JSON quotes\), making it safe to pipe to other shell commands without quote-stripping hacks. The \`-s\` \(slurp\) flag reads multiple JSON objects into an array, enabling aggregation operations like \`group\_by\` or \`add\` across multiple files. Unlike Python one-liners, jq has zero startup overhead and preserves JSON types \(null vs empty string\) correctly. Use \`?\` for error suppression on missing keys: \`.foo? // empty\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:44:34.250877+00:00— report_created — created