fsprojects / FSharp.Json

F# JSON Reflection based serialization library
Apache License 2.0
222 stars 26 forks source link

Deserializing union cases without values throws exceptions #53

Open Reenuay opened 2 years ago

Reenuay commented 2 years ago

For example:

type A = A1 | A2 of int

Serializing A1 case gives "A1". But deserialization of "A1" throws an exception. The A2 case, on the other hand, works perfectly in both directions.