Java JSON Tutorial - JSON Introduction

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V JSON stands for JavaScript Object Notation. It is a lightweight, text-based, human-readable data format.

JSON is Language independent.

The JSON format is specified in RFC 4627

The official Internet media type for JSON is application/json. The JSON filename extension is .json.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 V JSON is often used with JavaScript based application.

JSON format is used for serializing and transmitting data over network.

JSON Example

The following JSON data shows how to store Books information.

    "book": [
       "language": "Java",
       "edition": "third",
       "author": ""
       "language": "JSON",
       "edition": "second"
       "author": "Jack"

Output JSON

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 VThe following code shows how to output JSON format data using Javascript. Save the code as json.htm:

<script language="javascript" >
  var object1 = { "language" : "Java", "author"  : "" };
  document.write("<h3>Language = " + object1.language+"</h3>");  
  document.write("<h3>Author = " +"</h3>");   

  var object2 = { "language" : "JSON", "author"  : "Jack" };
  document.write("<h3>Language = " + object2.language+"</h3>");  
  document.write("<h3>Author = " +"</h3>");   
  document.write("<hr />");
  document.write(object2.language +"<br/> "+;
  document.write("<hr />");

JSON Comparison with XML

JSON and XML are both human readable, language independent data formats.

XML is more verbose than JSON and used to describe structured data.

成年女人免费毛片视频-伊人aV 影 伊人網a V在線 VJSON supports arrays.

The following JSON specify the company and its name.

   "company": "",
   "name": "Java2s"

Rewrite the above JSON in XML as follows.