Support deserializing a 16 byte binary guid/uuid#2156
Support deserializing a 16 byte binary guid/uuid#2156ramonsmits wants to merge 4 commits intoMessagePack-CSharp:masterfrom
Conversation
|
Since we can expect GUIDs to come in various formats, I agree with making the deserialization somewhat flexible. |
Fixed that
What does this mean? If many message pack serializeres serialize uuid as 16 byte big endian values?
I'm doing that now, but it felt such a common thing that I didn't expect that binary uuids were not supported. I didn't verify other runtimes/packages. As you can see there is significant size savings. Imaging a type that has a few uuid properties. That is 20 byte per uuid. |
|
@neuecc I also noticed this: NativeGuidFormatter: A remark on that type is the implementation only works on LITTLE endian environments. Would it be ok to refactor this PR into a new |
seems good. |
When sending a uuid with javascript its a string. I tried sending a
Uint8Arraybut that failed to deserialize. Turns out in only supports text formatted uuid. This adds support for deserializing a 16 byte guid.