dart-league / dson

dart library which converts Dart Objects into their JSON representation
Apache License 2.0
66 stars 14 forks source link

Ignore unknown fields #47

Open shoshani-ron opened 4 years ago

shoshani-ron commented 4 years ago

Hi, Currently, when I don't map a field I'm getting FieldNotFoundException. furthermore, if I will extend my API response and add new fields to it, the fromJson will throw an exception (FieldNotFoundException) and it will not parse it to the relevant entity, In addition, if I don't want to map all the fields in the entity the same result will happen.

There is a way maybe by an annotation that I can add on the Entity that will disable the throwing of the exception, the exclude and the ignore didn't help me.

Thanks