Fix serde for `Values` with optional `Type`s
Attention: these changes induce breaking changes for the serde representation of some types.
Serialization of Value
s used to rely on the get
function
followed by an unwrap
. This means that optional types couldn't
be serialized when they were None
.
This commit distinguishes between the optional Value
Types
and
the ones that always return some value.
The Value
s, Structure
fields and Tag
s with following types are
now represented as Option
s:
Buffer
DateTime
-
Sample
(note: this type is used forTag
images) -
String
(except forTag
s - see the comment intags_serde.rs
).
The representations for these Type
s remain unchanged when they are
used in-place (not as part of a Value
).
Also implemented ser / de for Value
s, Structure
fields and Tag
s
with Type
Date
.
Fixes #215 (closed)