Deserialize to an f# record
Opened this issue · 1 comments
albertjan commented
type Test = {
test: string
}
[<EntryPoint>]
let main argv =
let test = ConsoleApplication5.SimpleJson.DeserializeObject<Test>("{ \"test\": \"bier\" }");
printfn "%s" test.test
0 // return an integer exit code
A record does not have a constructor so it throws an exception.
But it can be made with FSharpValue.MakeRecord()
prabirshrestha commented
PR would be awesome for this.