Open yifanwww opened 1 year ago
Bug probably, until the unit test say different :)
actually the error handling here is intentionally graceful. The consequence of an error is just a missing datapoint in the json, not a forcefully broken process. Otherwise it would not be possible to parse the whole dataset and identify all issues in one go.
This doc implies that in
beforeDeserialize
we can docallback(err)
to stop the deserialization and get a throwed error, just like we do it inafterDeserialize
.However, the real behavior is different. It behaves like the field/prop doesn't exist and just skips it.
For example:
We would expect that it should throw an error
err
, but it doesn't.I checked the code, here it just ignores any errors from
beforeDeserialize
, is there any reason or is it a bug?