22 Feb 2013 12:05 PM #1
method to extract the store (nested) data as a json object
Is there an extjs api method that would allow me to extract the data from a store/model into a json object. It should take into account nested data.
Probably it shouldn't be too hard to write, but I thought of asking first (and, yes, I did look in the docs but I didn't find anything that fits 100% what I want to do).
23 Feb 2013 6:07 AM #2
Extjs have Ext.JSON.encode() for encode an object,array or other value in json.
for more info read API doc - http://docs.sencha.com/ext-js/4-1/#!...-method-encodesword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.
25 Feb 2013 10:10 AM #3
I knew about the Ext.encode method. You can't call Ext.encode(<someStore>) because the store has so many data members and methods and so on. As a matter of fact I tried it on a simple store and I got this:
Uncaught RangeError: Maximum call stack size exceeded
What I am looking for is a method that extracts the data from the store and takes into account the associations (if any), then it converts it to a json object which I can pass to the Ext.encode method.
17 Apr 2013 6:03 AM #4
Any solution so far?