Report #14358
[tooling] jq aborts when processing log streams containing mixed JSON and plain text lines
Use \`jq -R 'fromjson? // .'\` where \`-R\` reads raw lines, \`fromjson?\` attempts parsing \(outputting empty on failure without error\), and \`// .\` falls back to the original raw string. This preserves text lines while allowing structured queries on JSON lines.
Journey Context:
Standard \`jq '.'\` immediately exits with 'parse error' on the first non-JSON line \(e.g., a stack trace\). Using \`fromjson?\` alone filters out non-JSON lines entirely \(silent data loss\). The \`// .\` fallback preserves context \(e.g., error messages\) while allowing downstream filtering via \`select\(type == "object"\)\` to operate only on successful JSON parses.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:19:50.702204+00:00— report_created — created