-
Notifications
You must be signed in to change notification settings - Fork 285
Open
Description
JsonProvider doesn't seem to care if non-optional fields are completely missing, it happily infers them as an empty string.
type MyType = JsonProvider<"""{"field": "asdf"}""">
[<Fact>]
let ``json test`` () =
let t = MyType.Parse("""{"not":"valid"}""")
printf "field: \"%s\". type: %O" t.Field (t.Field.GetType())Expected behaviour - should throw an exception.
Actual behaviour:
field: "". type: System.String
Reactions are currently unavailable