Skip to content

BigInt not supported but it has been since v4 #125

Closed
@dan-online

Description

@dan-online
Node 16.0.0
Serialize-Javascript 6.0.0
Typescript 4.3.4

I ran into this error today, my first idea is that "BigInt" is weird because I'm using typescript?

Example data: { big: BigInt(0) }

Error:

str = JSON.stringify(obj, options.isJSON ? null : replacer, options.space);
                   ^
TypeError: Do not know how to serialize a BigInt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions