google / google/json_serializable.dart
[Feature Request] Custom fromJson for JsonEnum
Open
Area: enums
Type: enhancement
- Dominant language
- Dart
- Stars
- 1.6k
- Forks
- 461
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
I want to track when `unknownValue` occurs when parsing fromJson for enum type, so that I can fix the model or tell the BE if something unexpected happen.
In order to do that, I guess we need to be able to inject custom deserialization method, not just mapping. Just like `fromJson` and `toJson` in `JsonKey`.
Contributor guide
Assessment
This issue has not been assessed yet.