I am sending an event with a payload with JSON data. I am forming the data with escaped “” quotes.
This is how I publish:
String msg = String::format("{“RPP”:%li, “SOLNRG”:%f, “VTS”:%f, “SOC”:%f, “LOWP”:%d, “DSLP”:%li}", reportPeriod,solarNrg,voltage, soc,alert,wasInDeepSleep);
So the Quotes are escaped to form the payload string…
In the event it appears like this:
{“data”:"{“RHUM”:48.946899, “TMP”:1610612736, “BARO”:29.840662, “WDIR”:0, “WSPD”:0}",“ttl”:“60”,“published_at”:“2015-10-27T06:43:01.303Z”,“coreid”:“30003b000447343138333038”,“name”:“WXATMOS”}
So the slahes are there!
How can I remove those?
I am unable to retrieve the data from the keys… Since the keys contain the \
I have exactly the same issue - cannot post numbers, can only post strings using webhooks. Easiest way is to have a proxy hop in-between PHP / Node that converts strings to numbers before posting to Parse.com.
This is a known limitation in the way Particle web hooks are implemented. @Dave commented on this in an different discussion.