NSJSONSerialization bug?

半腔热情 提交于 2019-12-01 02:56:47

It looks like Apple did a bad work in error handling of such cases within their class, since your getting crash instead of normal nil result and error variable populated. Your json data and minimalistic code is what Apple usually require for a proper bug report. Report the bug by following link - https://developer.apple.com/bugreporter/ do not forget to attach project in zip as a proof that it crashes.

Josh Brown

I had this issue and for me, the issue was a duplicate key in the JSON. My key was named differently - not "is_subscribed" like in your case, but "food_nutrients". I'm willing to bet that iOS 6 crashes on any duplicate keys where there's another key in between - not just an "is_subscribed" key as some of the comments suggest.

I've confirmed that duplicate keys of any name are the issue. Related: https://stackoverflow.com/a/21148319/2030

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!