I am creating an application in that I need to send a JSON to the server to get some response.
How to generate JSON using JSON Framework for iPhone?
What are the other possible ways?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create an array or dictionary of objects representing the information you want to send via JSON. Having done that, send
-JSONRepresentationto the array/dictionary. That method returns a JSON string, and you send it to the server.For instance:
After executing the code above,
jsonStringcontains: