Logstash JSON parser error

My logs are full of this one particular error - exception=>#<LogStash::Json::ParserError: Invalid UTF-8 middle byte 0x54 at [Source: [B@49854dd9; line: 1, column: 302]>, :level=>:warn}

I checked the message, it is valid JSON.

Could is be some encoding problem?

The original message is a base64 string which I decode using the ruby filter

ruby {
    code => "require 'base64'; event['message'] = Base64.decode64(event['message'])"

Could I be messing up the encoding somewhere here?

What does the extracted message look like? What does your configuration look like?