Lambda saysJSON.parse turns a JSON string into JS; JSON.stringify turns JS into a JSON string.
JSON is the data format of the web. JSON.parse(str) builds objects/arrays from text (throws on invalid JSON — wrap in try/catch). JSON.stringify(value, replacer, space) serializes; the third argument pretty-prints with indentation. JSON only covers data — functions, undefined, and dates don't round-trip cleanly.
Power-ups you unlock
JSON.parse(str) → JS value (throws on bad input)
JSON.stringify(val, null, 2) pretty-prints
Functions/undefined are dropped; dates become strings
The lingua franca for APIs and storage
The Mutator attacks — common mistakes
Parsing untrusted input without try/catch
Expecting Date objects to survive a round-trip
Circular references throwing in stringify
Boss battleStringify an object with 2-space indent, then parse it back.