Back to search

JSON, JSON.parse, and JSON.stringify in JavaScript

JSON is a text format for structured data, and JavaScript uses `JSON.parse` to read it and `JSON.stringify` to serialize it.

JavaScript Easy Theory

JSON, JSON.parse, and JSON.stringify in JavaScript

JSON is a text format for structured data, and JavaScript uses `JSON.parse` to read it and `JSON.stringify` to serialize it.

  • JSON is text, not live objects
  • Parsing turns text into values
  • Stringifying is common for APIs and storage

JSON, JSON.parse, and JSON.stringify in JavaScript