I’m parsing some JSON which comes to me in this format:
{
dataId = "823o7tr23d387g";
category = "link";
details = {
text = "Some text associated with the link";
url = "http://www.url.com";
thumbnail_url = "http://www.url.com/picture.jpeg";
};
source = "CNN";
},
{
...
},
MagicalRecord has a great importing method: + (id) importFromObject:(id)data; but does it support dictionaries inside the JSON dictionary so that it can automatically map the details {} to the appropriate properties?
Is there a naming convention or something I will need to use?
Check out this article about using MagicalRecord to automatically import JSON, specifically the data keypath support section
http://www.cimgf.com/2012/05/29/importing-data-made-easy/