Improve MessagePack model
Current implementation of the MessagePack model allows for creation of malformed objects as the ByteVector class (which underlays most of the types in the model) has a maximum length of Long.MaxValue bytes which is bigger than the specification defines for some types.
This PR proposes following changes:
-
Float32(ByteVector)->Float32(Float) -
Float64(ByteVector)->Float64(Double) -
Timestamp32(ByteVector)->Timestamp64(Int) -
Timestamp64(ByteVector, ByteVector)->Timestamp64(Long)withnanosecondsandsecondsfields -
Timestamp96(ByteVector, ByteVector)->Timestamp96(Int, Long)
Ref. #603
I have currently held back from changing the integer types. UnsignedInt would have to hold a BigInt in order to keep a sign which is not quite performant. We could also bit cast it into a Long but I think it would be confusing for users.
Looks good to me, let's see if @ybasket has some comments.
No, was only waiting for the small fix you had requested. LGTM