I'm developing an iOs 4 application with latest SDK and XCode 4.2.
I'm using a web service to retrieve some data, and I receive that data. But, when I do this
NSString *json_string = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];
receivedData has 944bytes but json_string is nil.
From web service I'm getting this string (copy & pasted from 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 have tried to validate JSON here, http://jsonformatter.curiousconcept.com/, but I get it is invalid. Show me this formatted output:
{
   "posts":[
      {
         "ID":"324",
         "fecha":"10/02/2012",
         "titulo":"Preparada para la lluvia",
         "texto":,
         "foto":"2012/02/image20.jpg"
      }
   ]
}
And this errors:
Error:Strings should be wrapped in double quotes.[Code 17, Structure 20]
Error:Invalid characters found.[Code 18, Structure 20]
Any clue about what is happening?
 
     
    