JSON.stringify()

The JavaScript function that converts a value into a JSON string; JSON.parse() converts the string back.

In more detail

An optional third argument adds indentation for readable output. JSON loses types such as Map, Set and Date and fails on circular references, which the structured clone algorithm handles.

Related terms

Taught in

References