Hi! Thanks for the great project! I'm opening an issue because I ran into a situation where I need to JSON.stringify an object containing a bigint. I can bail out back to parsing to/from strings, but it looks like one (forward-looking) way to accomplish this is via JSON.rawJSON, by doing something like:
JSON.stringify(
{"bigint": 9223372036854775807n},
(key, value) => typeof value === 'bigint' ? JSON.rawJSON(value.toString()) : value
)
It might be a bit soon to implement but I wanted to get the proposal on your radar!
Hi! Thanks for the great project! I'm opening an issue because I ran into a situation where I need to
JSON.stringify
an object containing abigint
. I can bail out back to parsing to/from strings, but it looks like one (forward-looking) way to accomplish this is viaJSON.rawJSON
, by doing something like:It might be a bit soon to implement but I wanted to get the proposal on your radar!