Tarmil / FSharp.SystemTextJson

System.Text.Json extensions for F# types
MIT License
325 stars 44 forks source link

Unwrapping single-field single-case discriminated union. #63

Open voroninp opened 4 years ago

voroninp commented 4 years ago

Hello, thansk for the awsome library.

Is it possible to just serialzie the value of the field in case of single case du?

type Foo = Foo of value:int

So {| Prop1 = Foo 1; Prop2 = Foo 2 |} is serialized as { prop1: 1, prop2: 2 }

xperiandri commented 3 years ago

67 related