Dear community,
I need to parse a JSON of the following format:
{
"commitId": "xxxxxxx",
"author": {
"name": "",
"email": "",
"date": ""
},
"committer": {
"name": "",
"email": "",
"date": ""
},
"comment": "",
"changeCounts": {
"Add":,
"Edit":,
"Delete":0
},
"url": "",
"remoteUrl": ""
}
My pipeline.conf looks like this:
input{
file{
path => "somepath"
start_position => "beginning"
sincedb_path => "nul"
}
}
filter{
json {
source => "message"
}
}
output{
stdout {codec =>rubydebug}
elasticsearch {
hosts =>"http://localhost:9200"
index => "demo-json"
}
}
However I am getting a _jsonparsefailure error on almost any line of the json.
My goal is a format like this
{
"commitID": "",
"authorName": "",
"date":"",
"comment": ""
}
What could the reason for _jsoparsefailure be and how can I "level up" the nested fields in the next step?
Thank you in advance.