Report #65629
[gotcha] JSON.stringify throws TypeError when encountering BigInt values
Implement a replacer function that converts BigInt to string: \`JSON.stringify\(obj, \(k, v\) => typeof v === 'bigint' ? v.toString\(\) : v\)\`
Journey Context:
BigInt is a primitive type without a default JSON representation. Unlike Number, String, or Boolean, JSON.stringify has no serialization path for BigInt and throws TypeError per ECMAScript spec. This crashes logging, API request serialization, and Redux persistence when financial calculations use BigInt for precision. Developers must choose between string representation \(preserves full precision but requires re-parsing\) or Number conversion \(loses precision above 2^53\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:38:24.127341+00:00— report_created — created