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
{{ message }}
Repository navigation
InvalidOperationException inside MsgPack (Do not convert System.String MessagePackObject to System.Int64.) #204
Do not convert System.String MessagePackObject to System.Int64.
at MsgPack.MessagePackObject.ThrowInvalidTypeAs[T](MessagePackObject instance)
at MsgPack.MessagePackObject.AsInt64()
at MsgPack.Serialization.DefaultSerializers.NativeDateTimeMessagePackSerializer.UnpackFromCore(Unpacker unpacker)
at MsgPack.Serialization.MessagePackSerializer`1.UnpackFrom(Unpacker unpacker)
at MsgPack.Serialization.MessagePackSerializer`1.Unpack(Stream stream)
at MsgPack.Serialization.MessagePackSerializer`1.UnpackSingleObject(Byte[] buffer)
at _HashSetSeralizationFailsAndWriteFails() in Test.cs:line 391
This issue occurs when I try to deserialize serialized string as DateTime. Here is a reproduce code:
var date = MessagePackSerializer.Get<DateTime>().UnpackSingleObject(MessagePackSerializer.Get<string>().PackSingleObject("test"))
I would expect to get standard SerializationException as MsgPack does whet I try to deserialize same serialized string as a HashSet<string> instance.
Activity
yfakariya commentedon Nov 29, 2016
Thank you, you are right. It should be appropriate type and message.
cspwizard commentedon Nov 30, 2016
Can you give an estimate on new version release date with this issue fix?
yfakariya commentedon Dec 4, 2016
Unfortunately, I'm busy in this month, so it will be next year. Sorry.
Add test for issue #204.
Wrap InvalidOperationException with SerializationException for built-…
yfakariya commentedon May 4, 2017
Fixed in 6b25651