Quantcast

ZF2 Decode Restful JSON Request

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ZF2 Decode Restful JSON Request

clarkstachio
This post has NOT been accepted by the mailing list yet.
I apologize for the repost. I posted this a couple of days ago when I wasn't properly subscribed to the mailing list, and my post was listed as pending ...

I'm building a REST server in ZF2 based on Zend\Mvc\Controller\AbstractRestfulController. I do not want the controllers to be aware of the format of the request response (json, xml, etc.). I am currently using JsonStrategy to format my response. My question is, what is the recommended way to decode a request before it hits my rest controller. Are there strategy classes for decoding a request?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: ZF2 Decode Restful JSON Request

dershao
Same use case here. I'm currently using ExtJS on the client side and the the vars are submitted with json encoding. Until there is another solution I'm using this: https://gist.github.com/3237158
Loading...