Skip to main content

JSON

JSON is an open standard file format and data inter change format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.More..


History:

JSON 1.0 was adopted as ECMA-404 in October 201 3. Douglas Crockford originally specified the JSON format in the early 2000s.


Example:

<!DOCTYPE html>
<html>
<body>

<h2>Access a JavaScript object</h2>
<p id="demo"></p>

<script>
const myObj = {name:"John", age:30, city:"New York"};
document.getElementById("demo").innerHTML = myObj.name;
</script>

</body>
</html>