[FLOW3-general] JSON
Robert Lemke
robert at typo3.org
Mon Oct 25 11:32:00 CEST 2010
Hi Zach,
Am 25.10.2010 um 04:31 schrieb Zachary Davis, Cast Iron Coding LLC:
> Can anybody point me in the right direction for accessing a JSON request? I'm using the RESTController. For the create method, the object's properties are passed in as JSON. Is there a way to autowire the JSON request to the create method argument, as would be the case in a regular create method with data coming from a form?
in fact that's one part which is currently in the works, as we also need it for the TYPO3 Phoenix REST services:
http://git.typo3.org/FLOW3/Packages/TYPO3.git?a=blob;f=Classes/Controller/NodeController.php;h=f04a717d1d417d010c020b8cb2205a96d72e19ee;hb=HEAD
The idea for the RESTController is that the typical CRUD actions are auto wired to the request. And in fact that already works if you submit a real GET / POST / PUT / DELETE request (or at least it should work). What I haven't yet come to implement is an emulation mechanism for cases when no PUT / DELETE etc. is possible. I'm not sure yet what syntax to use - I guess a DELETE request would be triggered by a special GET parameter. But how would we call it?
Anyway, bottom line is: this part of FLOW3 is quite crude at the moment but your ideas and bug reports are highly appreciated!
Cheers,
Robert
More information about the FLOW3-general
mailing list