I seem to be facing a rather trivial issue that I cannot understand. I am using ASIFormDataRequest to interact with my Ruby on Rails application. I have a REST API that accepts a User object. I am using JSONKit to get a JSONString from an NSDictionary.
However, when I do [request setPostValue: [userObj JSONString] forKey: @ "user"];
The server-side request ends up leaving quotes. Basically,
{"password": "hello", "name": "user", "email": " user@foo.com "}
TO
"{\" password \ ": \" Hello \ "\" name \ ": \" user \ ", \" email \ ": \" user@foo.com \ "}"
It ends with tangled rails and he complains about an invalid object. Can I make ASIFormDataRequest not hide quotation marks? I understand that this may be a problem with JSONString itself, but I cannot find a good solution here.
thank
source
share