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 managed to narrow down the issue. It seems that any DateTime field in an object causes the error. I've attached a test case. I understand this isn't something that's handled by MsgPack spec. However the error message is misleading. Is there anyway to fail with a more appropriate error message when a type that isn't compatible is in an object?
msgpack4nim depends heavily on Nim generics, much of the serialization code generated by the compiler, and that come with a cost. one of them is misleading error message.
a better serialization framework would be using macros + generics to generate better error message.
btw, your problem can be solved by overriding pack_type and unpack_type for DateTime.
jfilby
changed the title
Exception for int64 when unpacking
Exception for int64 when a field is DateTime
Oct 13, 2021
When I try to unpack an object type that contains int64 types I get:
The object I'm packing/unpacking is a seq of an object type. This is to and from a FileStream.
The text was updated successfully, but these errors were encountered: