I am having some problems parsing some JSON.
The guy who put together the server code assures me that everything is fine, but whenever I try to parse some JSON via the JSONP proxy in sencha touch, I get a warning “Resource interpreted as Other but transferred with MIME type undefined.”. This says to me that the formatting is broken on the APIs end.
The example callback is: http://api.pickple.com/comment/list?post_key=201108240008&site_key=etnews_20110616&format=json (sorry, there is some Korean in there)
and the code I am using to parse is:
Ext.define('Paythread.model.Comment', {
extend: 'Ext.data.Model',
fields: ['user_id', 'total_count'],
proxy: {
type: 'jsonp',
url: 'http://api.pickple.com/comment/list?post_key=201108240008&site_key=etnews_20110616&format=json',
reader: {
type: 'json',
root: 'result'
}
}
});
I have tried this same exact code with a JSON file on the local side and everything worked fine, so I am about 95% sure that the problem lies in either how I am parsing it or the JSON returned itself.
Any ideas?
Try running your JSON through a json formatter/validator like: http://jsonformatter.curiousconcept.com/ or http://jslint.com/