eredo / dartson

Dartson is a Dart library that can be used to convert Dart objects into a JSON string.
MIT License
79 stars 29 forks source link

Enable access to unknown properties #41

Open jimirocks opened 7 years ago

jimirocks commented 7 years ago

Introduce some mechanism for accessing unknown properties when decoding. For example in Jackson (java) there is @JsonAnySetter.

Dartson equivalent could be something like:

@Entity()
class MyEntity {
  @Property() String knownValue;
  @AnyProperty() Map<String, dynamic> unknownProperties;
}