← TechnologyThe essentials of

JSON.stringify(): which values are not retained as expected

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 12:40. This is not editorial approval.

In a few sentences

In brief

JSON does not represent any JavaScript type without conversion.

Useful to know

JSON.stringify() converts an appropriate JavaScript value into JSON text. In case of a property with value undefined, the field can be omitted : JSON.stringify({a: 1, b: undefined}) gives '{"a":1}'. In an array, undefined is represented as null. [1]

Therefore serialization is not a universal deep copy of an arbitrary state. Functions, cyclical connections, and other types have limitations. Before recording, define a scheme with the admissible data and check the losses. The text that appears valid JSON, may not yet contain all the properties that the application expected.

Sources

For further detail and to check the information:

  1. [1] MDN — JSON.stringify ↗