Parsing JSON Array results in JSON parse error

I am trying to parse a JSON array by using the json codec. I have been looking at split. But all the examples assume that the array is within a JSON object. But in my situation, the array is not within an object.

The data comes in the following structure but on a single line:

[
    {
        "prop1": "value1",
        "prop2": "value2",
        "prop3": "value3"
    },
    {
        "prop1": "value1",
        "prop2": "value2",
        "prop3": "value3"
    }
]

Please show the error message.

[2017-11-16T13:03:48,957][ERROR][logstash.codecs.json] JSON parse error, original data now in message field {:error=>#<LogStash::Json::ParserError: Unexpected end-of-input: expected close marker for Array.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.