background preloader

Json

Facebook Twitter

Convert XML to JSON in PHP. The emergence of Asynchronous JavaScript + XML (Ajax) has created a renewed enthusiasm in Web application development and is causing many architects and developers to rethink the ways in which they create Web applications.

Convert XML to JSON in PHP

JavaScript Object Notation (JSON) is a data interchange format used to represent data in the business logic running on browsers. Many Ajax developers prefer handling data directly using JSON in the browser-side JavaScript code. As the usage of JSON increases, it will become necessary for middleware server programs to provide enterprise application data to the browsers in JSON format rather than in XML format. This means that developers need to convert existing server-side enterprise data encoded in XML to JSON before sending it to the browser. This article shows you how to use PHP-based server programs to convert XML-formatted application data to JSON format before you send it to the browser application.

Handling JSON like a boss in PHP. There are already lots of tutorials out there on handling JSON with PHP, but most of them don’t go much deeper than throwing an array against json_encode and hoping for the best.

Handling JSON like a boss in PHP

This article aims to be a solid introduction into JSON and how to handle it correctly in combination with PHP. Also, readers who don’t use PHP as their programming language can benefit from the first part that acts as a general overview on JSON. JSONLint - The JSON Validator.