google / google/json_serializable.dart
Allow default value encoded as JSON
Open
Type: enhancement
- Dominant language
- Dart
- Stars
- 1.6k
- Forks
- 461
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
I have wirted like this。
```
@JsonKey(name: 'crop_area', defaultValue: {'top': 0.0, 'left': 0.0, 'right': 0.0, 'bottom': 0.0})
Crop_area cropArea;
```
I have defined Crop_area as model,but it dose not work when I use `CustomItem.fromJson({...})`,`{...}`not include `crop_area`
Contributor guide
Assessment
This issue has not been assessed yet.