Json to influx node error invalid boolean

Hello,

When I inject the following json into influxdb out node:

"
{
"tags": {
"MachineName": "TBL165-169",
"MachineType": "Rig Test"
},
"machine_working": true
}"

I get the error "Error: A 400 Bad Request error occurred: {"error":"unable to parse 'NoT/device machine_working="true",tags=[object Object]': invalid boolean"}↵"

Any ideas how to resolve this? or what the problem is?

Thanks

How exactly are you injecting that?

The error says it cannot parse:

'NoT/device machine_working="true",tags=[object Object]'

The [object Object] is in the place your tags object should be - and that's what you get if you let JavaScript stringify an object without encoding it to JSON.

So to figure out why that's happening, we'd need to see a bit more of your flow that generates that JSON and how you pass it to the influxdb node.

Great thanks for the quick reply, i've attached the nodes in question:

[{"id":"c5d94c5b.daed6","type":"inject","z":"eec9fac6.c51e98","name":"works ","topic":"NoT/device","payload":"{"tags":{"MachineName":"TBL165-169","MachineType":"Rig Test"},"machine_working":true}","payloadType":"json","repeat":"","crontab":"","once":false,"x":330,"y":520,"wires":[["b03fae38.3918b","f4219dbe.bf7b1"]]},{"id":"4efef8c0.893ad8","type":"json","z":"eec9fac6.c51e98","name":"","pretty":false,"x":730,"y":500,"wires":[["f4219dbe.bf7b1"]]},{"id":"f4219dbe.bf7b1","type":"influxdb out","z":"eec9fac6.c51e98","influxdb":"1ecde249.cde93e","name":"","measurement":"NoT/TBL165-169/TBL165-Rig-TestLab/TBL165-169BarsBendingState","precision":"","retentionPolicy":"","x":1220,"y":480,"wires":[]},{"id":"b03fae38.3918b","type":"debug","z":"eec9fac6.c51e98","name":"","active":true,"console":"false","complete":"payload","x":810,"y":720,"wires":[]},{"id":"1ecde249.cde93e","type":"influxdb","z":"","hostname":"172.16.24.11","port":"8086","protocol":"http","database":"TBGIOTDB","name":"TBGIOTTimeSeriesDB","usetls":false,"tls":""}]