Parsing multiple json in a file

Hello! I'm trying to parse a file that contains multiple json. Each json is not delimited by a new line or comma separated.

e.g. {"version":"0",....}{"version":"0",...}{"version":"0",...}

parsing with the following codec does not work

codec => json_lines {
delimiter => "^{"version":"

Any suggestion?

What input are you trying to use the codec on? You cannot use it on a file input or any other input that eats the newline from each line before sending it to the codec. This is explained in the documentation.

Hello, the input is a file. I'm wondering how to manage multiple json with the same structure in the same file. json filter is enough?


As the documentation says, use a json codec, not a json_lines codec.

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