PHP, JSON and JavaScript usage

June 14, 2009

Source: http://ditio.net/2008/07/17/php-json-and-javascript-usage/

Today i want to introduce you to jSON (JavaScript Object Notation), in short, it is a simple format designed to exchange data between different programming languages. I will show you how to create JavaScript object, convert it to JSON string, and send to PHP script, which will decode jSON string to readable format (for PHP). But that’s not all, PHP script will create it’s own data object encode it to jSON string and send it back. All communication between JavaScript and PHP will be done thru AJAX.

Advertisements

Using JSON with JavaScript

May 30, 2009

Source: http://blog.platinumsolutions.com/node/91

JSON (JavaScript Object Notation) is a light weight data interchange format alternative to using xml with Ajax. It is a subset of the JavaScript object literal notation that which is basically made of 2 object types. The first being a collection of name value pairs similar to a hash table. An ordered list of values is the other, basically representing an array.