Posted on: Nov 06, '08

What Is Json ?
What is JSON ?
Javascript Object Notation
JSON make easy to interchange between programming language to JavaScript.
JSON is class/library that we can use to convert a variable from PHP variable to JavaScript Variable.
its another way to use javascript on your site and not have to worry about people having it turned off since doesn't require javascrpt tags to actually run it.
it make programing in javascript quicker and more effective.
It is a Fat-Free Alternative to XML.
JSON data can be included from websites outside the domain origin of the web application (avoiding the same-origin limitations of XMLHttpRequest) by using JSON-in-script.
JSON can be be used as an alternative to XML representation of data with the added benefits that JSON is easier to "parse" for JavaScript client code
Sample code snippet to generate JSON string for php array.
<?php
$myArray = Array('a'=>'the first', 'b'=>'is second');
$json = new JSON();
echo $json->convert($myArray);
?>
testing
Tags: javascript, json, php, xml