Closed bramp closed 4 months ago
doh, thanks I totally missed that.
In my example, it now generates:
CheckedFromJsonException
Could not create `Person`.
There is a problem with "name".
type 'Null' is not a subtype of type 'String' in type cast
Still not as descriptive as the field 'name' is missing
, but it's certainly better, and I can live with that.
This is a feature request for more descriptive / helpful error messages.
Take this example:
and I try and deserialise a empty object (e.g
Person.fromJson({})
) I get the error:a more helpful error message would be
It doesn't seem possible to configure these errors, or make the error checking more robust. Right now all I can tell my user is Something is wrong with your JSON object.
am I missing something? or is this a reasonable feature request?
thanks