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

64bit int decode error: Object doesn't support property or method 'readInt32BE' #27

Closed
pharring opened this issue Feb 26, 2016 · 2 comments

Comments

@pharring
Copy link

msgpack.decode([129, 161, 120, 211, 0, 0, 0, 0, 0, 0, 0, 0]);

Result: Object doesn't support property or method `readInt32BE'

I see #1 about true 64-bit integer support, but this is more of a decoder error. I can work around this in my own code (by adding the missing methods, readInt32BE and readUInt32BE). In my case, I'm dealing with data downloaded from an ASP.Net server running a C# implementation of the msgpack protocol where 64-bit integers (long/ulong) are supported natively.

@pharring pharring changed the title 64bit int decode error 64bit int decode error: Object doesn't support property or method 'readInt32BE' Feb 26, 2016
@kawanet
Copy link
Owner

kawanet commented Feb 26, 2016

msgpack.decode() requests Buffer instance instead of Array instance.

msgpack.decode(Buffer([129, 161, 120, 211, 0, 0, 0, 0, 0, 0, 0, 0]));

This would work at node.js. See #28.

@kawanet kawanet closed this as completed Feb 26, 2016
@kawanet
Copy link
Owner

kawanet commented Feb 26, 2016

Now msgpack.decode() accepts Array instance at version 0.1.17!

msgpack.decode([129, 161, 120, 211, 0, 0, 0, 0, 0, 0, 0, 0]); // => {x: 0}

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

2 participants