Tag Archive

XML to JSON in PHP">XML to JSON in PHP

Published on 3 May, 2011 By Danny Froberg

Zimuel writes; Last fri­day, in occa­sion of the April Zend Frame­work Bug-Hunt, I started to look at this bug: ZF-3257. This is an issue related to the Zend_Json class that occurs dur­ing the con­ver­sion from XML to JSON for some spe­cific XML doc­u­ments, like this one:
1$xml= ‘<a><b id=“foo”>bar</b></a>’;
The result using Zend_Json::fromXml($xml, false) , where false indicated […]

JSON and XML POSTs">App_Controller_Helper_Params for JSON and XML POSTs

Published on 4 February, 2010 By Danny Froberg

Matthew Weier O’Phinney shares a bit of very use­ful code to inject request params into a Zend Frame­work request object from a JSON or XML POST request.
“Below is a plu­gin I use to trans­late JSON or XML raw post request data to request user para­me­ters.
Note that it expects a “Content-Type” header of either “application/json” or […]

MVC application into an XML webservice using one single plugin">Converting your Zend Framework MVC application into an XML webservice using one single plugin

Published on 26 May, 2009 By Danny Froberg

Thijs Feryn writes an excel­lent arti­cle on how to con­vert your entire MVC app or one or more con­trollers into a XML ser­vice. I actu­ally have this one in a pro­duc­tion envi­ron­ment and it works like a charm.

That’s right folks, in this blog post I’ll show you how you can con­vert your entire MVC appli­ca­tion into a REST-style XML web­ser­vice. And I’m not talk­ing about refac­tor­ing tons of code … NO, we’ll plug this option in with­out chang­ing a sin­gle thing to your action controllers.

Get Adobe Flash player