Closed
Description
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?
Metadata
Metadata
Assignees
Labels
No labels