Issue
I have the following log line
{"code":200,"message":"ok","responseBody":{"token":"asdadqwrqwkjrqwejr"},"time":"4545425244"}
and using logstash json plugin to parse this log but logstash show following error in logstash-plain.log :
exception=>#< "LogStash" ::Json::ParserError: Unexpected end-of-input in VALUE_STRING
what is the problem ? thanx
Solution
The exception
Unexpected end-of-input in VALUE_STRING
is thrown when the the parser reaches the end of the text to be parsed whilst trying to read a value. For example, the following will produce that error because it is missing a closing double quote.
input { generator { count => 1 lines => [ '{"message":"ok}' ] } }
filter { json { source => "message" remove_field => [ "message" ] } }
output { stdout { codec => rubydebug { metadata => false } } }
If it runs out of text whilst reading the name of a field the exception will be Unexpected end-of-input in field name
(that would happen for {"message}
).
Answered By - Badger Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.