You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After trying to parse some json strings with https://charafau.github.io/json2builtvalue/, it throws a RangeError exception when trying to parse empty lists and null values, e.g.:
{ "a": 1, "b": 2, "c": [], "d": null }
Wouldn't it be better if you return dynamic types in this cases?
The text was updated successfully, but these errors were encountered:
thanks for comment. To be honest I'm not sure what would be the best case to support this case, the point of model class is to have strong type (now even more with dart2). In my opinion generator should show error when json is not valid.
Sorry for wrong response, I usually don't put nulls in json so it takes me long to fix those. As for me it should probably skip that if someone put 'null' in json
After trying to parse some json strings with https://charafau.github.io/json2builtvalue/, it throws a RangeError exception when trying to parse empty lists and null values, e.g.:
{ "a": 1, "b": 2, "c": [], "d": null }
Wouldn't it be better if you return dynamic types in this cases?
The text was updated successfully, but these errors were encountered: