Skip to content

Decode.keyValuePairs errors lack specific location #58

@witoldsz

Description

@witoldsz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions