0

See the format below

    {
  "layer_id":"1Wn",
  "name":"Example Place",
  "latitude":"45.5037078163837",
  "longitude":"-122.622699737549",
  "span_longitude":"0.62",
  "extra":{
     "description":"Portland",
      "url":"http://en.wikipedia.org/wiki/Portland"
      }
    }

How can I make JSON request form such format

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Chatar Veer Suthar
  • 15,541
  • 26
  • 90
  • 154
  • I think the old SO questions might help you http://stackoverflow.com/questions/6528834/send-json-request-with-restkit-rkparams http://stackoverflow.com/questions/4456966/how-to-send-json-data-in-the-http-request-using-nsurlrequest – Ajeet Pratap Maurya Nov 23 '11 at 10:53
  • ya, i want to set from client side, and throught POST I will send to server, – Chatar Veer Suthar Nov 23 '11 at 11:05

1 Answers1

0

What about using a framework like json-framework to get all the JSON details right?

Have also a look at this S.O. question about a sample code.

Once you have got your JSON payload as a string, you can then send it to your server according to its API.

Community
  • 1
  • 1
sergio
  • 68,819
  • 11
  • 102
  • 123