PDA

View Full Version : How to serialize model to JSON?



masm
3 Feb 2012, 1:11 AM
I need to get JSON representation of my model (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Model) object. Is it safe just to use data property or there is another right way to do it?

tvanzoelen
3 Feb 2012, 2:18 AM
Depends on what you need it for. The data you can encode with Ext.encode() and delivers a string.