I am developing an iOs 4 application with the latest versions of the SDK and Xcode 4.2.
I use a web service to retrieve some data, and I get this data. But when I do this
NSString *json_string = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];
receivedData has 944 bytes, but json_string is zero.
From the web service, I get this line (copy and paste from the browser window):
{"posts": [ { "ID": "324","fecha": "10/02/2012","titulo": "Preparada para la lluvia","texto": "Β‘Al mal tiempo buena cara! Eso pensΓΒ© al vestirme el otro dΓa que hiz...","foto": "2012/02/image20.jpg" } ] }
I tried to check the JSON here, http://jsonformatter.curiousconcept.com/ , but I realized that this is not true. Show me this formatted output:
{ "posts":[ { "ID":"324", "fecha":"10/02/2012", "titulo":"Preparada para la lluvia", "texto":, "foto":"2012/02/image20.jpg" } ] }
And these errors:
Error:Strings should be wrapped in double quotes.[Code 17, Structure 20] Error:Invalid characters found.[Code 18, Structure 20]
Any clue on what's going on?
source share