I have a string as follows :
{:userid => "user", :password => "123"}
I am posting this string to server at login. But the server is accepting everything in the form of JSON object. So I need to convert this string into JSON object.
Also, the server is again returning the response as a JSON object. So how to convert it back to NSString?
You can either parse JSON yourself or use one of the available JSON libraries for iphone.
You can use:
json-framework or jsonkit or TouchJSON