FSharp.Json
FSharp.Json copied to clipboard
Improve union case serialization & added tests
I prefer this way of serialization of union cases. It's well usable from other languages like C#.
The major change in here is that union cases are now serialized as objects with fields. This can be done because the tuple of a union case can contain field names and if they don't contain a field name it is always there because the compiler autogenerates these.
I will consider this change. Though it's a breaking change (and not a breaking bugfix) to current logic. So such change in logic should be either under config flag or introduced in major release.
I did this minimal change during company time. I'm not using it anymore there but I'm willing to polish it in my private time, however this will take some time