Level 1M12Lesson 12.1

beginner45 minby DevFox

JSON: parse and stringify, and why JSON.parse returns any

Turn a value into JSON text with JSON.stringify and back with JSON.parse, and see why JSON.parse returns any: TypeScript checks before the text exists, so a typo slips through until you write the type on the box. Learn JSON’s strict rules, why a Map becomes {}, what a SyntaxError from JSON.parse means, and give TaskKit tasksToJson and tasksFromJson.

  • Fundamentals
  • TypeScript
JSON: `parse` and `stringify`, and why `JSON.parse` returns `any`. Read this lesson at .