View Full Version : Where is the JSON proxy protocol documented?

28 Aug 2011, 9:41 AM
I was having trouble getting a JSON proxy to work so I reverse-engineered this example:


and it turned out that the problem with my code was that my JSON back-end was not sending back the response that the ExtJS proxy code was expecting. Specifically, ExtJS expects a response to PUT and POST requests that looks like this:

{"success":"true", "data":{...}}

This is purely empirical. When my back end returns this, it works. When it doesn't, it doesn't.

Surely there is some documentation for this that I overlooked? Where is it? Thanks.

28 Aug 2011, 11:51 AM
i did not see some documentation on this somewhere in the Extjs-docs but you can follow this:


{"bindings": [ {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"}, {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"}, {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"} ]}

the response that extjs-json expects is (nearly) the same like the javascript-internal syntax.

hope that helps

28 Aug 2011, 12:00 PM
Thanks, but that's not what I was looking for. The documentation at json.org is just the general documentation for the json syntax. What I'm looking for is specific to ExtJS. There's some magic going on between the back-end for the JSON proxy and the ExtJS Store object (and maybe the Grid object).

But I think I may have found what I'm looking for: