Example:
[<JsonFSharpConverter(BaseUnionEncoding = JsonUnionEncoding.Untagged)>]
type Sql =
| Sql of sql: string
| SqlId of sqlId: int
let options =
JsonFSharpOptions.Default()
.WithAllowOverride(true)
.ToJsonSerializerOptions()
JsonSerializer.Serialize(Sql "select *", options)
type Sql =
| Sql of sql: string
| SqlId of sqlId: int
val options: JsonSerializerOptions
val it: string = "{"Case":"Sql","Fields":["select *"]}"
Expecting {"sql":"select *"} .
Example:
Expecting
{"sql":"select *"}.