by daxterspeed · 8y ago · 0 comments
Or perhaps a proposal could be written to give numbers emitted by JSON.parse a "raw" property, so they could be decoded using BigInt?
e.g. so that {"foo": 1234567890123456789012345678901234567890} doesn't lose precision.
Maybe something like `{"x": 10n}`, but at that point, might as well do reviver, especially if you already agreed on a format and use some to parse out class instances vs plain objects.