2 ms·
> Sorry, why exactly can’t they also define the json.parse/stringify behavior of bigints? Because every construct in JSON already has a defined way that it is
by dragonwriter 6y ago
> Sorry, why exactly can’t they also define the json.parse/stringify behavior of bigints?
Because every construct in JSON already has a defined way that it is parsed into JS and incorporating BigInt into that by default would break backwards compatibility of JS’s JSON handling.
Interop concerns make the right JSON serialization very application dependent, too.