I am using json_lines codec along with http_input in my pipeline. One of the elements in my JSON is querystring. Usually, this codec is able to handle all the variants of valid jsons except below
"querystring": {
"a": true,
"p[]": [
"q",
"l"
],
"z": "x"
}
When I use this event, logstash writes one line on log saying:
[2020-07-17T07:17:10,052][WARN ][logstash.codecs.jsonlines] JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Invalid FieldReference: `p[]`>, :data=>"
When I tried using same json without '' after letter 'p', the codec is able to parse it correctly. So below json, works fine :
"querystring": {
"a": true,
"p": [
"q",
"l"
],
"z": "x"
}
Does anyone know how to fix this behaviour or the root cause of this?