Skip to content

JS_WriteObject does not serialize symbol keys #481

Closed
@bnoordhuis

Description

@bnoordhuis

It doesn't throw an exception, it just silently ignores them:

qjs > new Uint8Array(bjson.write({[Symbol.toStringTag]: "42"}))
Uint8Array(4) [ 12, 0, 8, 0 ]

(8 = object tag, 0 = property count)

Labeling bug because preferably quickjs is taught to (de)serialize them. If that's not feasible, it should probably raise an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions