This one is valid. But this is not the same as the one you posted before.
You can easily create this json with JsonGenerator:
Dim jg As JSONGenerator
jg.Initialize(CreateMap("temp": "Hello World "))
Log(jg.ToString)
Thanks for the tip - I tried that but the received data is still not formatted correctly:
{
"{\"temp\":\"Tag Data goes here\"}": ""
}
Is there any way to check the raw data being sent via PostString without using a network sniffer? The spec for the IoT server update is as follows and I need to check where the data sent from my app differs from this spec. I am also wondering if I need to set the content type to "application/json" and if there is a way to do this for POST with the current Httputils2?
{
"path" : "/dweet/for/{thing}",
"operations": [
{
"method" : "POST",
"nickname" : "postDweet",
"parameters" : [
{
"paramType" : "path",
"name" : "thing",
"description": "A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions.",
"dataType" : "string",
"required" : true
},
{
"paramType" : "query",
"name" : "key",
"description": "A valid key for a locked thing. If the thing is not locked, this can be ignored.",
"dataType" : "string",
"required" : false
},
{
"paramType" : "body",
"name" : "content",
"description": "The actual content of the string. Can be any valid JSON string.",
"dataType" : "string",
"required" : true
}
],
"summary" : "Create a dweet for a thing.",
"errorResponses": []
}
]
}