I am using JSON (SBJson)开发者_高级运维 but it's giving the error :
JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x5f2f7f0 {NSLocalizedDescription=Unrecognised leading character}.
am using this web service : "http://xoap.weather.com/search/search?where=India" please give me the solutions why does error come?
That URL returns XML, not JSON. The "illegal character" is the first bracket in the XML, which isn't a valid character in JSON.
That response is XML (application/xml
), not JSON (application/json
).
精彩评论