JSON introduction, AJAX post JSON data in PHP

JSON: JavaScript Object Notation.
JSON is smaller than XML and easy to parse.
JSON format:
a name followed by colon, followed by a value, such as
i.e fruit = “apple”
JSON object using curly bracket
var temp={“fruit”:”apple”, “juice”:”orange”}
To access JSON object value:
temp.fruit, temp.juice
JSON array using square bracket:
var JSONarray= {
{“fruit”:”apple”, “juice”:”orange”},
{“fruit”:”banana”, “juice”:”watermelon”}

To access the value apple in…

, , , , , ,

2 thoughts on “JSON introduction, AJAX post JSON data in PHP

  1. nice tutorial

    dataType: "JSON",

    is not showing the data.

    when i have changed data type json to html its showing some thing but json data type is not working ..moreover rest of the thing is fine.

Leave a Reply

Your email address will not be published. Required fields are marked *