msgpack-java icon indicating copy to clipboard operation
msgpack-java copied to clipboard

Documentation doesn't explicitly explain what packInt / packByte / etc do

Open Ben-Cutler opened this issue 7 years ago • 0 comments

I hit an issue a few days ago with the fact that the MessageBufferPacker's packInt method (and other pack methods ) pack a number to take as little space on the wire as possible (So your i32 could be serialized as a u16, a u8,i8, etc) . This caused an issue with another library that was type sensitive.

While this is a reasonable implementation, the documentation here https://static.javadoc.io/org.msgpack/msgpack-core/0.8.2/org/msgpack/core/MessagePacker.html Should mention that packInt , packByte , etc do not guarantee the binary header of that type

Ben-Cutler avatar Sep 09 '18 00:09 Ben-Cutler