Closed 2moveit closed 7 years ago
No, managing the shape of the serialization formats is beyond the design goals of this library. While you could use pickler combinators to influence how serialized types look like, this will only take you so far.
Ahh ok, thanks for clarification and the hint with the combinators. I tried it with combinator but so far I was not able to get it to work. It's not really the serialization format that is important to me. If I try to deserialize it e.g. into a C# class it's not that nice with the "Some" key as there is no option type in C#. So it's more interoperability within .NET from my point of view. So it would be really nice to figure it out how to achieve it with combinators.
FsPickler is a serializer for types, so you should always deserialize using the same .NET type.
OK, thanks
Hi, if I serialze this:
The json result is:
Is it somehow possible to change that behavior to always get a result like this in stead of null and a nested value?
During my research I found a possible solution on SO but they are using Json.Net directly. I think it should be somehow possible to configure FsPickler so that this result is possible.