News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

IBM developerWorks:
Convert XML to JSON in PHP
January 18, 2007 @ 14:32:00

In this new post on the Zend Developer Zone today, Cal Evans shares a link to an interesting article over on the IBM developerWorks website. It deals with converting XML to JSON using PHP.

With the growing popularity of Web 2.0, a new data interchange format called JavaScript Object Notation (JSON) is emerging as a useful way to represent data in the business logic running on browsers. Learn how PHP-based server programs can convert XML-formatted enterprise application data into JSON format before sending it to browser applications.

The article starts with the basics, XML and JSON, then moves quickly on to other topics like "browser-side data processing" and "xml-to-json conversion". From there, it's all about the code - creating the xml2json script to make the transition simple. It incorporates the Services_JSON package to help with the handling.

The entire code is laid out in one block, making it simple to cut & paste and mess with a bit. They even include a sample of its usage as a command line script, complete with sample input and the resulting output.

0 comments voice your opinion now!
xml json convert servicesjson package xml json convert servicesjson package


blog comments powered by Disqus

Similar Posts

Pierre-Alain Joye's Blog: Finally some new features are coming, zip-1.9.0 serie began

Sameer Borate's Blog: Building a Graph data structure in PHP

Greg Beaver's Blog: Planting PEAR seeds - you can decide PEAR's future

Shahar Evron's Blog: Adapters of the new Zend_Http_Client

Edin Kadribasic's Blog: Second PHP build using the new compiler


Community Events





Don't see your event here?
Let us know!


list package deployment release series language library api introduction framework tips symfony podcast opinion interview community bugfix install voicesoftheelephpant laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework