Lena
Lena

Reputation: 1460

I got this error while working in JSON part 1 sample xcode

I am getting the following error:

Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x6a2b1a0 {NSLocalizedDescription=Unrecognised leading character}

Please tell me what this error means?

Upvotes: 0

Views: 493

Answers (2)

user557219
user557219

Reputation:

This error is returned by SBJSON when the first non-whitespace character is different from

{ [ " f(alse) t(rue) n(ull) - 0 1 2 3 4 5 6 7 8 9

and it means that the JSON data you’re trying to parse is not valid.1 As @Nirmal suggested, use http://jsonlint.com to validate your JSON data. For a description of what valid JSON should look like, see http://json.org and RFC 4627.

1The error also means that the first non-whitespace character is different from +, which is not valid JSON.

Upvotes: 1

Nirmal
Nirmal

Reputation: 4829

Try to validate your JSON object here, I guess there is some issue with the JSON output..

Upvotes: 0

Related Questions