首页 新闻 赞助 找找看

MessagePack 反序列化异常 "Attempted to read past the end of the stream"

0
悬赏园豆:30 [待解决问题]

一个 ASP.NET Core 6.0 的项目中 redis 客户端的序列化/反序列化组件用的是 MessagePack,日志中发现下面的发序列化错误:

MessagePack.MessagePackSerializationException: Failed to deserialize BlogPostStatsDto value.
 ---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
      at MessagePack.MessagePackReader.ThrowNotEnoughBytesException()

请问如何解决?

问题补充:

调用 MessagePack 进行反序列化的代码

MessagePackSerializer.Deserialize<T>(serializedObject, _options);
dudu的主页 dudu | 高人七级 | 园豆:31075
提问于:2022-06-27 10:19
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册