Monday, October 26, 2009

iPhone WCF RESTful service JSON ...

Hello everybody!
I've been writing a iPhone client application that consumes a WCF RESTful service. This service is hosted on a windows server 2008 machine and the main method returns JSON.
On the iPhone side I can get the response easily, but the problem occurs while parsing this JSON result.
I got response string such as this:
"{\"BoolValue\":\"True\",\"StringValue\":\"Wooooooow!!!!\"}"
In order to parse this string as a correct JSON string a I need to escape \" character and replace it with double-quotes ("). And that's the problem. I tried to make a NSString with string concatenating it with valid (@"") empty string, didn't help, also tried to convert it to other encodings, didn't help too.

Any advice would be helpful, any link (I've searched a lot), thanks in advance.
I've got iPhone OS simulator running 3.1.2 OS version, to parse JSON I use JSON-framework.

Orignal From: iPhone WCF RESTful service JSON ...

No comments:

Post a Comment