google / google/json_serializable.dart

Allow default value encoded as JSON

Open
#676 3 comments 3 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.