Skip to content
Discussion options

You must be logged in to vote

Try this in the VRL Playground

The inner message is invalid JSON: the quotation marks that belong to the string value need to be escaped. The producer should emit this JSON text:

{"test":"this","key_with_quotes":"\"quotes\""}

Then .out = parse_json!(.message) parses it directly. The playground includes the complete outer event and correct escaping. A global replacement of "" cannot reliably repair arbitrary JSON; it also matches valid empty strings.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@yjagdale
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
vrl:stdlib Changes to the standard library
2 participants