Ext.decode does not work for normal json - Mar Java Mit Java

Ext.decode does not work for normal json

I recently upgraded EXT js from version 4.1 to 6.6 and suddenly saw following code getting broken

Ext.decode("{ totalrows:15}"

I know the JSON provided is not native JSON but still it used to work earlier. After raising ticket with the EXT team i found that they are expecting a native JSON by default now. To change this behavior we need to set that setting and this is what we need to do

Ext.application({
    name : 'Fiddle',
 
    launch : function() {
        Ext.USE_NATIVE_JSON = false;
        console.log(Ext.decode("{ totalrows:15}"));
    }
});

This worked as expected

Uday Ogra

Connect with me at http://facebook.com/tendulkarogra and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *