path-to-error
path-to-error copied to clipboard
Reporting the content of the key that doesn't match (untagged enum)
Hello, I'm parsing various data structures from JSONs an currently I'm getting an error that looks like this:
Error deserializing StructureX JSON: Error { path: Path { segments: [Map { key: "key1" }, Map { key: "key2" }, Map { key: "key3" }, Seq { index: 0 }, Map { key: "key4" }, Map { key: "key5" }, Map { key: "key6" }, Seq { index: 1 }, Map { key: "key7" }] }, original: Error("data did not match any variant of untagged enum EnumYFromStructureX", line: 0, column: 0) } for some specific case!
What I'd be interested in if I can get reported back the content of the key that did not match the enum - in any form (bytes/UTF-8 string/etc).