Is there a way to use the map type adapter on a nested class using toJson?
Open
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
For example, if we were to have a class such as:
```dart
class Dog {
String name;
Trait trait
}
class Trait {
String traitName;
TraitAction action;
Map toJson() => ....
Trait.fromJson(...);
}
```
Would it be possible to create a type adapter for Dog that converts the nested trait object into json rather than having to create a new type adapter for the trait class?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.