Loading Please Wait...
The JSON syntax is a subset of the JavaScript syntax.
JSON syntax is derived from JavaScript object notation syntax:
JSON data is written as name/value pairs (aka key/value pairs).
A name/value pair consists of a field name (in double quotes), followed by a colon, followed by a value.
JSON names require double quotes.
"name":"Lynxsia"
The JSON format is almost identical to JavaScript objects.
In JSON, keys must be strings, written with double quotes.
In JavaScript, keys can be strings, numbers, or identifier names:
{"name":"Lynxsia"}
// OR
{name:"Lynxsia"}
In JSON, values must be one of the following data types:
In JavaScript values can be all of the above, plus any other valid JavaScript expression, including:
In JavaScript, you can write string values with double or single quotes but In JSON, string values must be written with double quotes only.
let name = 'Lynxsia' // JavaScript
// OR
{name:'Lynxsia'} // JavaScript
{name:"Lynxsia"} // JSON
Because JSON syntax is derived from JavaScript object notation, very little extra software is needed to work with JSON within JavaScript.
With JavaScript you can create an object and assign data to it, like this:
company = {name:"Lynxsia", country:"India"};
You can access a JavaScript object like this:
company.name;
// OR
company["name"];
Data can be modified like this:
company.name = "Lynxsia IT Solutions";
// OR
company["name"] = "Lynxsia IT Solutions";
The same way JavaScript objects can be written as JSON, JavaScript arrays can also be written as JSON.
The file type for JSON files is ".json"
The MIME type for JSON text is "application/json"
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved