From 2e72d85c4aadc96144f8e7bc73f92c0137fc9b0c Mon Sep 17 00:00:00 2001 From: Jorge Hermo Date: Wed, 14 Aug 2024 22:52:27 +0200 Subject: [PATCH] docs: add docs for the new lossy option of the parse_json vrl function --- website/cue/reference/remap/functions/parse_json.cue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/cue/reference/remap/functions/parse_json.cue b/website/cue/reference/remap/functions/parse_json.cue index 512fa5fdcc9b7..15c935857b801 100644 --- a/website/cue/reference/remap/functions/parse_json.cue +++ b/website/cue/reference/remap/functions/parse_json.cue @@ -28,6 +28,17 @@ remap: functions: parse_json: { required: false type: ["integer"] }, + { + name: "lossy" + description: """ + Whether to parse the JSON in a lossy manner. Replaces invalid UTF-8 characters + with the unicode character `�` (U+FFFD) if set to true, otherwise returns an error + if there are any invalid UTF-8 characters present. + """ + required: false + default: true + type: ["boolean"] + }, ] internal_failure_reasons: [ "`value` is not a valid JSON-formatted payload.",