🍋
Menu
Web

JSON

JavaScript Object Notation

A lightweight, human-readable data interchange format based on key-value pairs and arrays.

Technical Detail

JSON is part of the web platform's core infrastructure. Modern browsers implement lightweight through standardized Web APIs, ensuring consistent behavior across Chrome, Firefox, Safari, and Edge. The relevant specifications are maintained by the W3C, WHATWG, or IETF. Understanding the underlying protocol or mechanism helps developers use json correctly, avoid common pitfalls, and optimize for performance and security.

Example

```javascript
// JSON parse with reviver function
const data = JSON.parse(text, (key, val) => {
  if (key === 'date') return new Date(val);
  return val;
});

// JSON stringify with replacer and indentation
JSON.stringify(data, ['name', 'email'], 2);
```

Related Formats

Related Tools

Related Terms