Git Product home page Git Product logo

Comments (4)

yfakariya avatar yfakariya commented on July 18, 2024

Hi, @darkl

You can enable 'new protocol' specifying PackerCompatibilityOptions.None to Packer.Create method or SerializationContext.CompatibilityOptions.PackerCompatibilityOptions property. It is intended behavior to interop old bindings. Note that Unpacker always handle bin types.

from msgpack-cli.

darkl avatar darkl commented on July 18, 2024

Hi @yfakariya
Thanks for your response,
I tried your suggestion and I still get String as the underlying type:

Here's the code

MemoryStream stream = new MemoryStream();
Packer packer = Packer.Create(stream, PackerCompatibilityOptions.None);
packer.PackBinary(new byte[16]);
stream.Position = 0;

Unpacker unpacker = Unpacker.Create(stream);
unpacker.Read();
Type type = unpacker.LastReadData.UnderlyingType; // string?

from msgpack-cli.

yfakariya avatar yfakariya commented on July 18, 2024

Hi @darkl

I recognized the issue. Unpacker certainly recognize new binary type, but it handles it as raw type. It should always treat binary type as byte[], so I will fix it. Thanks!

from msgpack-cli.

darkl avatar darkl commented on July 18, 2024

Thanks @yfakariya

from msgpack-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.