# Telegraf MQTT Input plugin error - Invalid character

**URL:** <https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912>\
**Category:** Telegraf\
**Tags:** mqtt, json, plugin\
**Created:** [May 5, 2022, 6:50am UTC](https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912 "2022-05-05T06:50:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![WANders](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@WANders](https://community.influxdata.com/u/WANders)\
**Post date:** [May 5, 2022, 6:50am UTC](https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912/1 "2022-05-05T06:50:21Z")

</div>

I get this error message when I’m trying to feed JSON data via MQTT and Telegraf.

2022-05-05T06:39:15Z E! [inputs.mqtt\_consumer] Error in plugin: invalid character ‘0’ after object key:value pair

The MQTT message looks like this.

![mqtt_influx_forum_telegraf_error](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/4/42010b8e49a3c2547475ccea2c90bf538958e249.png)

Is the double 00 before the float value 0.x causing the problem or is it something else?

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [May 9, 2022, 2:30pm UTC](https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912/2 "2022-05-09T14:30:44Z")

</div>

> Is the double 00 before the float value 0.x causing the problem or is it something else?

It is very likely that the triple leading zero is the issue. If I try to reproduce that using a JSON document, it will complain of invalid JSON. Removing the extra two ‘0’ (e.g. `0.01`) results in success.

---

<div class="post-metadata">

**Author:** ![WANders](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@WANders](https://community.influxdata.com/u/WANders)\
**Post date:** [May 12, 2022, 8:28am UTC](https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912/3 "2022-05-12T08:28:11Z")

</div>

This seems to be the case. However, is there something to explain this? Invalid data type / structure?

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [May 12, 2022, 10:48am UTC](https://community.influxdata.com/t/telegraf-mqtt-input-plugin-error-invalid-character/24912/4 "2022-05-12T10:48:00Z")

</div>

The sensor provides an invalid or at least extremely unusual number format. The standard json parser cannot cope with this.
