Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Discrepancy for binary keys between browser and nodejs #120

Open
redhog opened this issue Jul 11, 2023 · 0 comments
Open

Discrepancy for binary keys between browser and nodejs #120

redhog opened this issue Jul 11, 2023 · 0 comments

Comments

@redhog
Copy link

redhog commented Jul 11, 2023

If a map has keys that are not strings but bin format, in nodejs these are parsed as ascii text (or utf8?). However, in the browser these are first stored as a Int8Array, and then turned to strings using toString(), which makes e.g. the key "type" (ascii) look like "116,121,112,101". Either handling would be fine, but the inconsistency is a problem.

My test case is serializing using msgpack-numpy in python and then trying to deserialize using msgpack-lite (note: msgpack-numpy doesn't use an ext type but just produces a map object for some reason, and also uses bin format for the keys, instead of strings, again, for some "reason"...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant