We're trying to import a json file that starts as an array (starts with [ and ends in ].
A truncated input file:
[
{
"uri": "uri/feature",
"id": "idvalue",
"keyword": "Feature",
"name": "name",
"description": "description",
"line": 2,
"comments": [
{
"value": "#encoding: utf-8",
"line": 1
}
]
}
]
My ls config file:
input{
file {
path => ["path to json file"]
start_position => "beginning"
codec => "json"
}
}
output{
stdout{ codec=>"rubydebug"}
}
Produces this type of error:
"path" => "path to json file",
"host" => "host name",
"@version" => "1",
"message" => " ]\r",
"@timestamp" => 2018-07-13T19:39:04.064Z,
"tags" => [
[0] "_jsonparsefailure"
I'm pretty sure this is related t the file starting out as an array, just trying to find out the best way to handle this situation.