To log my sensor data I am trying to use Sense OS. It only accepts a JSON post of the form:
{
“data”: [
{
“value”: 10,
“date”: 1353656777.123
}
]
}
However, using the HTTP request vimp (application/json) all my data ends up inside an extra “value” field. I tried changing my output to a string and a table (http://forums.electricimp.com/discussion/420/json-encoder/p1) but both result in something like:
body { “channel”: 1, “target”: “30c82807b644020e”, “value”: { “date”: 1353656832, “value”: 0.19658197462558746 } }
or
body { “channel”: 1, “target”: “30c82807b644020e”, “value”: “{‘data’: [{‘value’: 10,‘date’: 1353656777.123}]}” }
How can I work around the default “value” field and customize my JSON in the HTTP request? I’m curious about your ideas.