0

I tried to store the json string in this below manner

NSString * str =@"{"CategoryID":1,"ItemCount":1,"level":1,"Name":"Boots","Description":"Boots descrition","childs":[{"CategoryID":2,"ItemCount":1,"level":2,"Name":"Cold Water","Description":"Cold Water Description","childs":[]}]}]";

I got an error message.I know it is a very small solution. And i tried so many NSString methods but i did n't get the solution. How will i store this string ?

Thanks in advance...

4

1 回答 1

0

最后我得到了我的问题的解决方案

我们需要通过以下方式传递字符串。

 NSString*str=@{\"CategoryID\":1,\"ItemCount\":1,\"level\":1,\"Name\":\"Boots\",\"Description":\"Boots descrition\",\"childs\"[{\"CategoryID\":2,\"ItemCount\":1,\"level\":2,\"Name\":\"Cold Water\",\"Description\":\"Cold Water Description\",\"childs\":[]}]}];
于 2012-07-13T09:29:13.870 回答