title: iOS JSON Error: NSDebugDescription=Garbage at end
body: <p>This is a really weird bug, when grabbing JSON from my server (which is produced via PHP), I get this error when calling:</p>
  
  <pre><code>json = [NSJSONSerialization JSONObjectWithData:kivaData
                                         options:kNilOptions
                                           error:&amp;jsonError];
  </code></pre>
  
  <p>JSON Error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0x178467d00 {NSDebugDescription=Garbage at end.}</p>
  
  <p>My (NSData* kivaData) grabs everything perfectly, but it cant parse the JSON.</p>
  
  <p>I have run my JSON code in <a href="http://jsonlint.com/" rel="nofollow">http://jsonlint.com/</a> and it comes out Valid everytime.</p>
  
  <p>Its really weird because it can parse the JSON when I connect to Wifi, but when I try doing it via cellular, it wont work. It does work over cellular on some peoples phones, but every time.</p>