Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

JS_WriteObject does not serialize symbol keys #481

Closed
bnoordhuis opened this issue Aug 18, 2024 · 0 comments · Fixed by #539
Closed

JS_WriteObject does not serialize symbol keys #481

bnoordhuis opened this issue Aug 18, 2024 · 0 comments · Fixed by #539
Labels
bug Something isn't working

Comments

@bnoordhuis
Copy link
Contributor

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.

@bnoordhuis bnoordhuis added the bug Something isn't working label Aug 18, 2024
saghul added a commit that referenced this issue Sep 22, 2024
saghul added a commit that referenced this issue Sep 24, 2024
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant