Sunday, June 11, 2017

26/05/2017

JSON Datatypes


  • string
  •  
  • a number
  •  
  • an object (JSON object)
  •  
  • an array
  •  
  • a boolean
  • null


JSON values cannot be one of the following data types:
  • a function
  •  
  • a date
  •  
  • undefined


 JSON Strings

 
JSON strings must be written in double quotes.



JSON Numbers


 JSON numbers must be an integer or a floating point. 



JSON Objects

{
"student":{ "name":"Janusha", "age":19, "city":"Jaffna" }
}  




JSON Arrays

{
"student":[ "Janusha", "Karunya", "Poomika" ]
}  




JSON Booleans

JSON booleans can be true/false.

{ "sale":true } 



JSON Null

{ "middlename":null }  







No comments:

Post a Comment

HTML introduction

HTML stands for Hyper Text Markup Language. HTML describes the structure of web page using markup. HTML elements are the building blo...