JavaScript: JSON

By Xah Lee. Date: . Last updated: .

JSON is the value of the property key "JSON" of the Global Object.

console.log( window["JSON"] === JSON );

Type

Type of JSON is Object .

console.log(typeof JSON === "object");

console.log(
  Reflect.apply(Object.prototype.toString, JSON, []) === "[object JSON]",
);

Parent

Parent of JSON is Object.prototype.

console.log( Reflect.getPrototypeOf ( JSON ) === Object.prototype );

Purpose

Purpose of JSON is as a namespace, for functions working with the JSON format.

Properties

BUY
ΣJS
JavaScript in Depth

JS Obj Reference

JSON