I am trying to implement a .Net library for the API to adafruit io (Which for now is HTTP only).
It works fine, except when sending .Json as the data in 'value'. According to this "https://io.adafruit.com/api/docs/cookbook.html?ruby#double-encoded-json-strings" i can just send the value as .Json inside the .Json with 'value' 'lat' like this:
{"value":{"name":"Testname"}, "lat":12}
However i will get back a Bad Formatted or Unprocessable Entity from the Server. Even if i try the example provided on the mentioned page it does not work.
Does someone know if it is possible to send the value as .json in the way i am trying to do and it is just a bug in my code or is it maybe not possible with the HTTP API?
If i use the same code to send values of type string {"value":"TestValue", "lat":0.00, ...} it does work, so i would think that all the other settings should be correct.
My current workaround is therefore to send all data as value of type string like that:
{"value":"{\"TestValue\":10}", "lat":0.00, ...} (with escaped "), which does work but requires some extra handling which seems a bit unnecessary.
Does anyone have some information regarding this or spottet an error in the way i try to do that?