Add support for parsing ndjson #578
Labels
type: feature
A value-adding code addition that introduce new functionality.
vrl: stdlib
Changes to the standard library
I've recently come across a problem that would be more conveniently solved if I could parse ndjson strings within VRL. This could also extend to concatenated JSONs (e.g.
{"a":1}{"a":2}
), or JSONs with a delimiter other than newlines.I'm not sure exactly what would be the best approach for this feature would be, but I guess it would likely be one of the following:
You can achieve something similar with the
split
+parse_json
function, but that doesn't fail fast on JSONs across lines:{"a":"sentence"}\n{"a":"sentence\nwith\nnewlines"}
, and doesn't help with parsing JSON streams with no delimiter (e.g.{"a":1}{"a":2}
)The text was updated successfully, but these errors were encountered: