Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MessagePack Java Jackson Dataformat does not use str8 data type

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

The old msgpack-java (for example, 0.6.7) does not support the MessagePack str8 data type.

When you want your application to support older versions, you need to disable this data type, such as using the following statement:

MessagePack.PackerConfig config = new MessagePack.PackerConfig () .withStr8FormatSupport (false); ObjectMapper mapperWithConfig = new ObjectMapper (new MessagePackFactory (config)); / / This string is serialized as bin8 typebyte [] resultWithoutStr8Format = mapperWithConfig.writeValueAsBytes (str8LengthString)

Https://www.cwiki.us/display/Serialization/MessagePack+Jackson+Dataformat

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report