You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems like a really important thing to have. Did you have an idea or plan for how you think this should be implemented?
Most json encoding libraries I know of (at least circe and spray) track the path to the specific location of the decoding failure in some custom deserialization exception type. Then, the decoder can either pass the path into the structure as it parses (as circe does) or add the path information by catching and re-throw the deserialization exception type (as spray does).
Perhaps Decoder could get a slightly more complex interface (tracking the context) or else Validated could wrap more than just string error messages?
Did you have an idea or plan for how you think this should be implemented?
As you said, we need to carry more context information when we decode JSON documents. Like this is done with Circe and the history of operations, or Play JSON and the context path.
Perhaps Decoder could get a slightly more complex interface (tracking the context) or else Validated could wrap more than just string error messages?
I believe this would not be necessary but I might be wrong. Enriching Validated with more detailed error messages is also discussed in #446.
Currently, error reported by JsonSchema decoders don’t give much context information (like a full “JSON-path”).
The text was updated successfully, but these errors were encountered: