HJSON coerces invalid values to the string "undefined".
❯ HJSON.stringify(10n)
"undefined"
❯ HJSON.stringify([10n])
"[\n undefined\n]"
Same for bigint, undefined, functions and symbols.
For values not supported, it might be preferable to throw or to coerce to undefined (not the string).
This would however be a breaking change.
HJSON coerces invalid values to the string "undefined".
Same for bigint, undefined, functions and symbols.
For values not supported, it might be preferable to throw or to coerce to
undefined(not the string).This would however be a breaking change.