Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Proposal Update v5 #49

Open
chakrit opened this issue Aug 14, 2013 · 4 comments
Open

Proposal Update v5 #49

chakrit opened this issue Aug 14, 2013 · 4 comments

Comments

@chakrit
Copy link

chakrit commented Aug 14, 2013

There's been a debate over how to properly handle string serialization in languages with both string and binary support (the case with node.js) and this resulted in the msgpack owners redefining the spec and adding string support.

Please see the proposal update v5 documentation here: https://gist.github.com/frsyuki/5432559

Have you taken a look? What are the plans etc. Anything I can help with?

@mikepb
Copy link
Contributor

mikepb commented Aug 19, 2013

👍

@mikepb
Copy link
Contributor

mikepb commented Aug 19, 2013

Looks like the v5 has been adopted: https://github.com/msgpack/msgpack/blob/master/spec.md

@mikepb
Copy link
Contributor

mikepb commented Sep 7, 2013

I'm building in support for the new spec in a feature branch:
https://github.com/mikepb/node-msgpack/tree/feature/msgpack-ng

It's a work in progress. The pack() method is slower than before, but more closely follows the JSON.stringify() behaviour, supporting toJSON and ignoring function values in objects in the same way. Using a replacer function is not yet supported. I don't have a need for a replacer right now, so won't spend time implementing it. There are options to serialize functions and RegExp objects as strings, and Date objects as doubles.

I am not focusing on performance, but on correctness instead. As was discussed in #38, we are at the point of diminishing returns for performance. Spending hours of engineering time to shave seconds per day isn't worth it.

@chakrit
Copy link
Author

chakrit commented Sep 8, 2013

FYI I also did the same but decided to base my fork off msgpack-js instead.

Here it is: https://npmjs.org/package/msgpack-js-v5 It's not as comprehensive, but works.

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

No branches or pull requests

2 participants