PDA

View Full Version : how to get json data?



spasmoid
2 May 2007, 1:01 PM
I'm trying to get a handle on .../ext/docs/output/Ext.data.JsonReader.html
but I'm not having much luck. Does anyone have a decent example?
The one provided doesn't even show you where you are supposed to plug your URL in.
I just want to be able to retrive a data object from a json encoded file(script).
Help much appreciated.

TopKatz
2 May 2007, 1:13 PM
with the HttpProxy

http://extjs.com/deploy/ext/docs/output/Ext.data.HttpProxy.html

The reader is just that, a reader.

72
2 May 2007, 10:23 PM
If you want to get data directly (process response on your own) you can use Ext.lib.Ajax.request



Ext.lib.Ajax.request( 'POST', 'http://samedomain/someuri', {success: processRequest} );

var processRequest = function( o ) {
var decodedArray = Ext.util.JSON.decode( o.responseText );
}


Hope its helps

spasmoid
7 May 2007, 5:50 PM
You have both been a great help.