feature request: control over Number packing #40

OrangeDog opened this Issue Feb 11, 2013 · 0 comments

1 participant


If I'm trying to send a message to something that's expecting a MSGPACK_OBJECT_DOUBLE I am currently unable to do so if the number also happens to be an integer - 0 for example - as MSGPACK_OBJECT_POSITIVE_INTEGER is chosen for me and the receiver doesn't know what to do with it.

A possible API could go like this:

var value = new Number(0);
value.msgpackType = msgpack.MSGPACK_OBJECT_DOUBLE; // 4
var msg = msgpack.pack([1, value]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment