JSON Tutorials
- What is Json
- Json Example
- Json Object Example
- Json with php
- How to Convert Data from MySQL to JSON using PHP
- How to store json Data into MySQL database using PHP
- How to insert json data into mysql database using PHP
- validate json string in php
- Json with AJAX
- Json with javascript
- Json Program example
Important Links
What is JSON?
JSON is JavaScript Object Notation.
A common use of JSON is to read data from a web server, and display the data in a web page
Uses of JSON
Why use JSON?
For AJAX applications, JSON is faster and easier than XML:
Using XML
Using JSON
Simple Example in Json.
File name : index.php
{
"employee": [
{
"id":"01",
"name": "itechtuto",
"address": "delhi",
"mobile": "7838897299"
},
{
"id":"02",
"name": "mahtab",
"address": "delhi",
"mobile": "7838897299"
}
]
}
syntax :-
JSON supports the following two data structures −
File name : index.php
Json VS XML
File name : index.php
JSON
XML
JSON stands for JavaScript Object Notation.
XML stands for eXtensible Markup Language.
JSON is simple to read and write.
XML is less simple than JSON.
JSON is easy to learn
XML is less easy than JSON.
JSON is data-oriented.
XML is document-oriented.
JSON doesn't provide display capabilities.
XML provides the capability to display data because it is a markup language.
JSON supports array.
XML doesn't support array.
JSON is less secured than XML.
XML is more secured.
JSON files are more human readable than XML.
XML files are less human readable.