Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to serialize Model in ExtJS

If I have Model and I want to serialize it to JSON to use in code, how can I do it better? I must use Reader/Writer or there is some other methods?

like image 804
aleksandr-chermashentsev Avatar asked Jan 01 '26 20:01

aleksandr-chermashentsev


1 Answers

Ext.encode for this specifically. (returns string of the json)

var json = Ext.encode(this.getStore().data.items[0].data);

More info available on sencha docs

like image 154
weeksdev Avatar answered Jan 03 '26 11:01

weeksdev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!