serde_json returns a serde_json::Error
when deserializing a field missing from the JSON but not optional in the struct. That error can be converted into a string and that string has the missing field name, generally of the form: Error("missing field 'b'", line: 1, column: 9)
.
缺少从该字符串中进行解析的方法,我无法弄清楚如何提取缺少的字段名称。字符串解析真的是我唯一的选择吗?