Closed OliverJAsh closed 2 years ago
Serialisation from within the core library is very thin and really only serves to remove the Symbol
wrappers from our keys. The expectation is that, given that serialisation is such a large area of concern, this is then handed off to something like io-ts, as in our bindings.
Consider this sum type which has another sum type nested inside of it. When we call
Sum.serialize
, only the outer sum type is serialized. The nested sum type is not serialized.Likewise, consider this sum type which has a
Date
inside of it. When we callSum.serialize
, only the outer sum type is serialized. TheDate
inside is not serialized.How should we handle situations like this?
Perhaps we need an API like this: