const s = `[ null, true, false, -1, 3.14, "a string", { "a-number": "-123" }, { "a-bigint": "-123n" } ]`; const parsed = JSON.parse(s, bigIntReviver); const s2 = JSON.stringify(parsed); console.log(parsed); console.log(s2); console.log(typeof parsed[6]["a-number"]) console.log(typeof parsed[7]["a-bigint"])