Currently I am writing an app (Target iOS 6, ARC enabled) that uses JSON for data transmission and Core Data for persistent storage. The JSON data is generated out of a MySQ
I know this question has been answered but I think some beginners may have the same issue as me and be brought to this question.
The EXC_BAD_ACCESS message was caused by malformed JSON. As I had accidentally used the same name for an Object which causes issues when converting the JSON into a dictionary.
Annoyingly it didn't bring up a formatting error. Here is an example of the JSON that caused the issue:
"levels" : {
"level1": {
....
},
"level1": {
... << All objects should have different names. This should be called level2.
},
"level3": {
...
}
To fix the issue I had to ensure that all objects of the same level had different names.