Feature Request: Support JSON stream
icholy opened this issue ยท 8 comments
icholy commented
It would be nice if jnv supported sequences of json objects separate by newlines the way jq does:
{ "a": 123 }
{ "a": 123 }
Note: fx also supports this.
mholt commented
This would be really useful for inspecting Caddy logs.
robpottify commented
Ditto useful for our use cases.
We're talking about JSON Lines, yes? https://jsonlines.org
icholy commented
@robpottify The objects are delimited by newlines, but jq
allows a single object to span multiple lines:
{
"a": 123
}
{
"a": 321
}
edit: jq
doesn't even require the newline:
{
"a": 123
} {
"a": 321
}
robpottify commented
Ah ok, so subtly different as JSON Lines prescribes newlines between records.
Should I raise a separate gh issue ticket for JSON Lines, or are they similar enough to be prioritised as one feature?
icholy commented
@robpottify JSON lines is a subset of JSON streams.
ynqa commented