Parsing Simple JSON Using Ext Gives SyntaxError: Unexpected Token ILLEGAL
i'm doing a simple parse of some JSON and it's giving me an error in chrome, what am i missing here? Ext.util.JSON.decode('{info: {synopsis: 'test'}}'); SyntaxError: Unexpected tok
Solution 1:
Think you should use double quotes instead of single quotes.
Ext.util.JSON.decode('{"info": {"synopsis": "test"}}');
Solution 2:
Be careful if you are using ExtJs 4 onward, You have to use
Ext.JSON.decode('{"info": {"synopsis": "test"}}');
Post a Comment for "Parsing Simple JSON Using Ext Gives SyntaxError: Unexpected Token ILLEGAL"