JSON is a Javascript Object Notation, that is very easy to use from PHP: For example, if you want to pass some parameters, like the user registration, you can do this:
<script>
// From PHP
var data = <?php echo json_encode(array(
'user_login' => $user_login,
'user_email' => $user_email
)); ?>;
alert("Hi " + data.user_login + " you email is: " + data.user_email);
</script>
The function 'json_encode' in php convert any object or array into JSON as string what you after can read from your JS script. I hope that it help you.
"Sorry for my english"