google / json_serializable.dart

Generates utilities to aid in serializing to/from JSON.
https://pub.dev/packages/json_serializable
BSD 3-Clause "New" or "Revised" License
1.54k stars 392 forks source link

How can I make it ignore "setter"? #1399

Open burekas7 opened 4 months ago

burekas7 commented 4 months ago

Hi,

Is there any way to make it ignore setters?

Currently, the only workaround that I found is to set: @JsonSerializable(ignoreUnannotated: true)

But it forces to add @JsonKey() above any field which is pretty annoying.

Thanks.