I am trying to send JSON from an actionscript/flex android app via POST. But I can't figure out how to create a JSON object in the right way.
it should look like this:
"pos"=>
{
"x"=>234,
"y"=>234
},
"gps"=>
{
"latitude"=>52.123,
"longitude"=>11.123
},
"event"=>"participation"
my code:
var request: URLRequest = new URLRequest(url);
// How do I create the data?
request.data = data;
request.contentType = "application/json";
request.method = URLRequestMethod.POST;
I have tried sending it as String, but then the server receives it with "" around, and can't parse it as JSON. I have also tried creating it as URLVariables, but then I don't know how to make it nested.