FSharp.Json icon indicating copy to clipboard operation
FSharp.Json copied to clipboard

Improve union case serialization & added tests

Open realvictorprm opened this issue 5 years ago • 3 comments

I prefer this way of serialization of union cases. It's well usable from other languages like C#.

realvictorprm avatar Sep 11 '19 17:09 realvictorprm

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.

realvictorprm avatar Sep 11 '19 17:09 realvictorprm

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.

vsapronov avatar Nov 19 '19 22:11 vsapronov

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

realvictorprm avatar Nov 19 '19 22:11 realvictorprm