I am trying to ingest a JSON document. Unfortunately, there seems to be a problem with null values on an object field. There are multiple fields like this, how can I resolve it?
When the field is null, it looks like this:
"assigned_to": "",
However, when there is content, the field looks like this:
"assigned_to": {
"link": "https://ba",
"value": "ba"
},
I get an error in logstashing stating:
"failed to parse field [assigned_to] of type [text] in document with id '59k36GsBxmyDjcqePz6P'", "caused_by"=>{"type"=>"illegal_state_exception", "reason"=>"Can't get text on a START_OBJECT at 1:2174"}}}}}
Pipeline
input {
file {
id => "Ingest"
path => "/*.json"
stat_interval => 2
start_position => "beginning"
close_older => 300
}
}
filter {
json {
id => "Parse"
source => "message"
}
}
output {
elasticsearch {
id => "Send to Elasticsearch"
}
}