0

I'm using NSJSONSerialization (very cool) to decode a string from a server. When I run it through…

    id theJSONObject = [NSJSONSerialization JSONObjectWithData:inData options:NSJSONReadingAllowFragments error:&jsonError];

I get back an array with 75 objects, exactly what I would expect. However, when I examine any one of those, it tells me:

 (<invalid>) [2] = <error: expected ']'

So thinking this was a JSON error, I pasted the text into JSONLint, which says it's fine.

I'm new to the JSON stuff, so I'm looking for pointers on how to debug this sort of thing.

Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98

1 Answers1

0

This is actually a problem with Xcode, the data is correct but the debugger incorrectly interprets it.

Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98