• logo
  • PHP
  • PHP OOPs
  • script
    • JavaScript
    • JQuery
    • Ajax
    • AngularJs
    • VueJs
    • NodeJs
    • ReactJs
  • wordpress
  • Codeigniter
  • Codeigniter 4
  • Laravel
  • Python
  • MySql
  • Json
  • C
  • C++
  • More ...
    • Cakephp Framework
    • MongoDb
    • MySqli PDO
    • .htaccess
    • HTML 5
    • CSS
    • SEO
    • DCA

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

Read More

Home » JSON »  About Json

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

  • It was designed for human-readable data interchange.
  • It has been extended from the JavaScript scripting language.
  • The filename extension is .json.
  • JSON Internet Media type is application/json.
  • The Uniform Type Identifier is public.json.
  • Uses of JSON

  • It is used when writing JavaScript based application which includes browser extension and websites.
  • JSON format is used for serializing & transmitting structured data over network connection.
  • This is primarily used to transmit data between server and web application.
  • Web Services and API.s use JSON format to provide public data.
  • It can be used with modern programming languages.
  • JSON is a syntax for storing and exchanging data.
  • JSON is an easier to use alternative to XML.
  • Why use JSON?

    For AJAX applications, JSON is faster and easier than XML:

    Using XML

  • Fetch an XML document
  • Use the XML DOM to loop through the document
  • Extract values and store in variables

  • Using JSON

  • Fetch a JSON string
  • JSON.Parse the JSON string
  • 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 :-

  • Data is represented in name/value pairs.
  • Curly braces hold objects and each name is followed by ':'(colon), the name/value pairs are separated by , (comma).
  • Square brackets hold arrays and values are separated by ,(comma).

  • JSON supports the following two data structures −

  • Collection of name/value pairs − This Data Structure is supported by different programming languages.
  • Ordered list of values − It includes array, list, vector or sequence etc.
  • 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.

    Output :-







    Itechtuto

    Connect Us Socially:

    Quick Links

    • itech
    • About Us
    • Feedback
    • Trademarks
    • Privacy Policy
    • Terms of Use
    • Sitemap
    • Trademarks
    • Privacy Policy
    • Terms of Use
    • Sitemap

    Copyright © 2016 itechxpert (P) Ltd. All rights reserved.

    Copyright © 2016 itechxpert (P) Ltd. All rights reserved.