MQTT Engine - JsonPayloadHandler NULL Values

Hi. I was configuring a new connection within MQTT Engine (Version 4.0.8) along with a custom namespace that had the option [Parse payload as JSON] enabled. When I do, I receive error logs from the JsonPayloadHandler logger that contains “JSON value for is NULL” and then it fails to handle adding tags for that specific topic. When I disable the parsing option, it generates all tags it has subscribed to. Most of the values within the payload are not null.

Does MQTT Engine not consider NULL values to be valid when generating tags even if the key is valid?

If so, is there a way to handle generating tags with NULL values within a configuration I’m missing? I’m assuming if not, then I just have to disable the JSON Parsing option to continue handling these messages.

The JSON parser in MQTT Engine for custom namespaces can’t handle null values because it doesn’t know what tag datatype to create based on that ‘value’. The parser uses the value to determine the datatype to create for the tag. If it is null, it is unable to do so.

1 Like

Thanks for the quick response! This makes sense and answers my question.