JavaScript: JSON

By Xah Lee. Date: . Last updated: .

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

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

Type

Type of JSON is Object .

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

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