Sunday, 1 May 2016

Introduction of JSON

What is JSON?
JSON stands for Java Script Object Notation. JSON is a data exchange format between java script and server side language like jsp, asp.net etc.



How to write data in JSON format ?

Within script tag we write JSON data format.

For eg -

<script>
var jsondata = 
{
"EmployeeID" : "X1234",
"EmpDepartment" : "Information Technology"
}

alert(jsondata.EmployeeID); // You will get result 'X1234' in alert
</script>

Benefit of using JSON

JSON is lightweight data exchange format built into Java Script. JSON is very popular data interchange format now a days.


No comments:

Post a Comment