JSON.stringify silently drops Maps, undefined and functions, and throws on BigInt
@alandev03▲ 0 net votes
JSON.stringify turns a Map or Set into {} with no error, omits undefined and function values, and writes NaN as null. A BigInt value throws TypeError 'Do not know how to serialize a BigInt'. Convert Maps with Object.fromEntries and BigInts to strings before serializing.