0% found this document useful (0 votes)
197 views2 pages

Tutorialspoint Examples: JSON Format and Data Types

This document discusses JSON format and data types. It defines the JSON syntax as a subset of JavaScript object notation. It lists the JSON data types as number, string, boolean, array, object, and null. An example JSON object is provided showing student data in an array of objects.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
197 views2 pages

Tutorialspoint Examples: JSON Format and Data Types

This document discusses JSON format and data types. It defines the JSON syntax as a subset of JavaScript object notation. It lists the JSON data types as number, string, boolean, array, object, and null. An example JSON object is provided showing student data in an array of objects.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

1/12/2016 JSON format and data types | Tutorialspoint examples

Tutorialspoint examples
(http://tutorialspointexamples.com)
Learn java tutorial with examples for beginners online

Search

JSON Format And Data Types
JSON Syntax:
JSON syntax is a subset of the JavaScript object notation syntax. JSON syntax has following
rules:
1. Data is represented in name/value pairs.
2. Data is separated by commas.
3. Curly braces hold objects and each object name is followed by colon.
4. Square brackets hold arrays.

JSON example:
{"students":[   
    {"firstName":"Sandy", "lastName":"Sethi"}, 
    {"firstName":"Roxy", "lastName":"Malik"}, 
    {"firstName":"Sunil", "lastName":"Antil"} 
]}

JSON datatypes:
Data Type Description
Number It represents double­precision floating­point format in JavaScript
String It represents double­quoted Unicode with backslash escaping
Boolean It represents true or false
Array It represents an ordered sequence of values
Value it can be a string, a number, true or false, null etc
Object It represents an unordered collection of key:value pairs
Whitespace It can be used between any pair of tokens

http://tutorialspointexamples.com/json­format­and­data­types/ 1/5
1/12/2016 JSON format and data types | Tutorialspoint examples

null It represents empty

 
Next Topic: How to create json object from string in javascript?
(http://tutorialspointexamples.com/how­to­create­json­object­from­string­in­javascript/)
Previous Topic: JSON overview. (http://tutorialspointexamples.com/json­overview/)

Related Topics:
How to build java project using ant in eclipse? (http://tutorialspointexamples.com/how­to­build­java­
project­using­ant­in­eclipse/)
JAXB marshalling – convert java object to xml example. (http://tutorialspointexamples.com/jaxb­
marshalling­convert­java­object­to­xml­example­using­one­pojo/)
How to create pdf file in java using iText jar? (http://tutorialspointexamples.com/how­to­create­pdf­file­
in­java­using­itext­jar/)
Generics class example. (http://tutorialspointexamples.com/generics­class­example/)
OGNL in struts 2. (http://tutorialspointexamples.com/ognl­in­struts­2/)
Hibernate One­to­One Mapping using xml. (http://tutorialspointexamples.com/hibernate­one­to­one­
mapping­using­xml/)
Send inline image in email using JavaMail API. (http://tutorialspointexamples.com/send­inline­image­
in­email­using­javamail­api/)
Quartz 2 JobListener example. (http://tutorialspointexamples.com/quartz­2­joblistener­example/)
 

  13    0   Share 0   Share 0    0   Share 0  


  0    0   Share 0    9

JSON Tutorial

JSON overview. (http://tutorialspointexamples.com/json­overview/) 
JSON format and data types (http://tutorialspointexamples.com/json­format­and­data­types/) 
JSON object from string. (http://tutorialspointexamples.com/how­to­create­json­object­from­string­in­
javascript/) 
Access json object array. (http://tutorialspointexamples.com/how­to­access­json­object­array­in­
javascript/) 
JSON object in java. (http://tutorialspointexamples.com/how­to­use­json­object­in­java/) 
Parse json in java. (http://tutorialspointexamples.com/how­to­parse­json­in­java­with­example/) 
Download JSON jar. (http://tutorialspointexamples.com/wp­content/uploads/2015/06/JSONLib.rar)

http://tutorialspointexamples.com/json­format­and­data­types/ 2/5

You might also like