You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use this library in a node.js application that communicates with a msgpack API. Unfortunately, I need to be able to send messages that use specific data types for specific fields (e.g. Array<fixint>, bin8, ...) rather than have the library automatically choose/guess as described in https://github.com/msgpack/msgpack-node#type-mapping.
How hard would it be to incorporate this? For example, I'd like to be able to do this:
// Binary dataconstbuff=getBufferFromSomewhere();msgpack.pack(buff,{family: 'bin'});// ==> chooses `bin8`, `bin16` or `bin32` depending on buffer size// Force particular numeric typemsgpack.pack(123,{type: 'fixint'});// Specify custom type mapping when packing arraysconsta=[{data: Math.PI,type: 'float64'},{data: 3.14,type: 'float32'}];msgpack.pack(a,{interpret(item){return{data: item.data,type: item.type,// alternatively:family: item.family,};}});
The text was updated successfully, but these errors were encountered:
I would like to use this library in a node.js application that communicates with a msgpack API. Unfortunately, I need to be able to send messages that use specific data types for specific fields (e.g.
Array<fixint>
,bin8
, ...) rather than have the library automatically choose/guess as described inhttps://github.com/msgpack/msgpack-node#type-mapping.
How hard would it be to incorporate this? For example, I'd like to be able to do this:
The text was updated successfully, but these errors were encountered: