You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this should live on the JsonSerializable annotation, and would apply to all fields under the annotated object.
Example usage:
@JsonSerializable(snakeCaseFields: true)
class Thing {
final Thing nestedThing;
}
Would be equivalent to the following:
@JsonSerializable()
class Thing {
@JsonKey(name: 'nested_thing')
final Thing nestedThing;
}
Enums are a bit of an edge case, its not clear if it should apply automatically to enum values or not. One specific edge case here is if an enum value has its own explicit JsonKey annotation, once that is supported. Would that always override this setting?
trietbui85, rohan20, Teonicel85 and GaelBitrietbui85, sosaucily and ValeriyLapin