MessagePack Proposal v5 with explicit string type. - #8
Merged
Conversation
Reference: https://gist.github.com/frsyuki/5432559#types-extension-type * Reorder decoder types detection code so it aligns with mapping tables in the specs. * Changed how `undefined` are handled, uses the `fixext 1` extension type instead. * Removed old `raw`-related things. * Added support for `str` type family decoded to node string. * Added support for `bin` type family decoded to node Buffer. * Added support for `ext` and `fixext` type family decoded to a [type, Buffer] tuple. * Exception for `fixext 1` which is just 1-byte long so a simple [type, value] is returned instead. * TODO: There is no test for the `ext` and `fixext` since there is no way/need in JS to specify and encode "extension" type. Would be good to have tests on decoding part though since other languages/implementation may have made use of them.
Contributor
Author
|
Official spec: https://github.com/msgpack/msgpack/blob/master/spec.md |
|
Could this help #15? |
Owner
Owner
|
👍 |
Contributor
Author
|
Wow, I've almost forgotten this PR, it has been so long. Also buried under a pile of other GH notifications. I'll try to get this mergeable tonight, hopefully. |
|
@chakrit cool 😄 |
Contributor
Author
|
@creationix @nkzawa I've merged master back into my fork and gotten rid of the only README conflict.
|
creationix
added a commit
that referenced
this pull request
Jul 26, 2015
MessagePack Proposal v5 with explicit string type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference: https://gist.github.com/frsyuki/5432559#types-extension-type
GH Issue: #7
undefinedare handled, uses thefixext 1extension type instead.raw-related things.strtype family decoded to node string.bintype family decoded to node Buffer.extandfixexttype family decoded to a [type, Buffer] tuple.fixext 1which is just 1-byte long so a simple [type, value] isreturned instead.
extandfixextsince there is no way/need in JS tospecify and encode "extension" type. Would be good to have tests on decoding part though
since other languages/implementation may have made use of them.