thoth-org/Thoth.Json.Net

Decode.keyValuePairs errors lack specific location

Opened this issue · 0 comments

How to reproduce:

#r "nuget:Thoth.Json.Net"
open Thoth.Json.Net

let decoder = Decode.keyValuePairs Decode.int
Decode.unsafeFromString decoder """ { "a": 1, "b": 2, "c": false } """
System.Exception : Error at: `$`
Expecting an int but instead got: false
   at Thoth.Json.Net.Decode.unsafeFromString[T](FSharpFunc`2 decoder, String value)

The problem is, the error does not show the problem occured when parsing "c" property of an object.