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

use msgpack extension type for buffers? #14

Open
dominictarr opened this issue Aug 26, 2014 · 3 comments
Open

use msgpack extension type for buffers? #14

dominictarr opened this issue Aug 26, 2014 · 3 comments

Comments

@dominictarr
Copy link
Contributor

I was just looking at the msgpack spec and I noticed this,

https://github.com/msgpack/msgpack/blob/master/spec.md#types-extension-type

so it seems like if this was used for the buffers then it would be much easier to be compatible with other implementations.

@tarruda
Copy link

tarruda commented Sep 7, 2014

In msgpack 2.0, raw has been split into two different types: bin and str(technically both are byte arrays, but str is a way of telling deserializers that the array is utf-8 and might be decoded into an other unicode representations). str has the same type code as raw in previous versions, so at least for strings, this library it will be backwards-compatible. bin is the new type that should be used for buffers

ext might be a suitable choice for undefined, though you might wanna expose an API for registering other types since there is a total of 127 "slots" for user types

@dominictarr
Copy link
Contributor Author

aha, so we only need to upgrade to msgpack@2 thanks!

@creationix
Copy link
Owner

I think the new msgpack spec has been out long enough I'd be willing to change this library. I don't have time at the moment to make the change myself though.

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

3 participants