MQTT发送json格式消息出现ERROR的原因是因为进行了2次转义,可以通过{\\\“type\\\”:1}这种格式解决发送出错的问题。
cmd:AT+MQTTPUB=0,"mmxq/report/device/123","{"type":1}",1,0
err recive:AT+MQTTPUB=0,"mmxq/report/device/123","{"type":1}",1,0
ERROR
MQTT发送json格式消息出现ERROR的原因是因为进行了2次转义,可以通过{\\\“type\\\”:1}这种格式解决发送出错的问题。
cmd:AT+MQTTPUB=0,"mmxq/report/device/123","{"type":1}",1,0
err recive:AT+MQTTPUB=0,"mmxq/report/device/123","{"type":1}",1,0
ERROR