google / google/json_serializable.dart
"createFromJson" for `@JsonSerializable` to turn on/off deserialization code generation
Open
- Dominant language
- Dart
- Stars
- 1.6k
- Forks
- 461
- Avg merge
- 45m
- Merged PRs (30d)
- 1
Description
Hi,
I have a class that only requires serialization to JSON but not deserialization.
For specific fields there is `includeFromJson` property for `JsonKey`.
Can we get the same for the whole class?
```dart
@JsonSerializable(createFromJson: false)
class MyClassThatOnlyNeedsSerialization {
// ...
}
```
Thanks! :)
Contributor guide
Assessment
This issue has not been assessed yet.