Adds trace information for errors happening when (de)serializing using contract schemas. I added a few unit tests, mostly to test the format of the trace errors for both JsonError and ToJsonError are as expected, however they are nowhere exhaustive (If we need more, let me know).
Changes
Adds JsonError::TraceError, which holds information about the path to the original JsonError produced when serializing from schema type
Adds ToJsonError type, which is now the error type returned when deserializing to schema type.
Checklist
[x] My code follows the style of this project.
[x] The code compiles without warnings.
[x] I have performed a self-review of the changes.
[x] I have documented my code, in particular the intent of the
hard-to-understand areas.
Purpose
Adds trace information for errors happening when (de)serializing using contract schemas. I added a few unit tests, mostly to test the format of the trace errors for both
JsonError
andToJsonError
are as expected, however they are nowhere exhaustive (If we need more, let me know).Changes
JsonError::TraceError
, which holds information about the path to the originalJsonError
produced when serializing from schema typeToJsonError
type, which is now the error type returned when deserializing to schema type.Checklist