mohanraaj
02-22-2012, 01:37 AM
I`m very much exited today. Because i have started learning some new functionality techniques...
but the problem is i dont know anything about json.... if you guys have any reference links to learn the JSON, it will be appreciable....
well while searching for the examples i got this sample code
<?php
//require_once "json/JSON.php";
//create a new instance of Services_JSON
$json = new Services_JSON();
//convert php object to json
$value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
$output = $json->encode($value);
print($output);
// prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
// accept incoming POST data, assumed to be in JSON notation
$input = file_get_contents('php://input', 1000000);
$value = $json->decode($input);
?>
if you guys have any idea of how to learn it with best possible examples, please discuss here...
thanks in advance....
but the problem is i dont know anything about json.... if you guys have any reference links to learn the JSON, it will be appreciable....
well while searching for the examples i got this sample code
<?php
//require_once "json/JSON.php";
//create a new instance of Services_JSON
$json = new Services_JSON();
//convert php object to json
$value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
$output = $json->encode($value);
print($output);
// prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
// accept incoming POST data, assumed to be in JSON notation
$input = file_get_contents('php://input', 1000000);
$value = $json->decode($input);
?>
if you guys have any idea of how to learn it with best possible examples, please discuss here...
thanks in advance....