1

I am working on an iPhone application. I have to send a POST request to a server in the JSON format. I found the following question: How would I send my array over a HTTP POST to the server?, with good comments suggesting the following URL had a solution: http://andyj.be.s79833.gridserver.com/blog/?p=65

However, this URL now no longer exists. Please provide me any help for posting JSON format data in the form of an associative array or provide any other help.

Community
  • 1
  • 1
  • Added obj C tag assuming you want an obj C based solution. – Mrchief Aug 15 '11 at 15:05
  • Are you wanting to create Objective-C objects and convert them to JSON with a JSON conversion package, or directly generate JSON. (For simple cases, where you have no need to receive JSON responses, it may be easier to do the latter. But if you're already "in bed" with a JSON conversion package you might as well use it.) – Hot Licks Aug 15 '11 at 15:58
  • Maybe this is what you need : http://code.google.com/p/json-framework/ – Salah Aug 17 '11 at 15:25
  • i think this explains a lot about your question. http://stackoverflow.com/questions/4456966/how-to-send-json-data-in-the-http-request-using-nsurlrequest – turbo Jan 16 '12 at 22:25

1 Answers1

0

If you are targeting iOS 5.0, you can use Apple's NSJSONSerialization class to turn an NSArray into a JSON string.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848