Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

feature request: control over Number packing #40

Open
OrangeDog opened this Issue · 0 comments

1 participant

James Howe
James Howe

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
Something went wrong with that request. Please try again.