Where is defined the according type for the JSON output in Zend Framework 2? -


i activated jsonstrategy in zf2 application , can json output using acceptableviewmodelselector controller plugin.

it works http request parameter accept containing application/json.

where application/json defined proper value json output? (how) can define , use foo/bar instead?

take here:

zend\view\strategy\jsonstrategy; 

you can implement own custom strategy in same manner no problem. cleaner hard coding controller can reused.


Comments