-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hi, great work. May I suggest adding a parameter to the JsonObject annotation to override default naming conventions.
such:
@JsonObject(fieldRename:FieldRename.snakeCase)
class Person{
final firstName;
}
``
to make the generated Json:
`"{'first_name':'Bob'}"`
instead of :
`"{'firstName':'Bob'}"`
Why? because most the API's I've worked with(might be biased) use snake_cased variables and dart encourages camelCasing.
I know this is currently avalable via the @JsonProperty name field but it is quite tedious to rename each field of a model , specially if it is a big one(although doable).
Let me know if this is a desirable feature, I might try to land a PR if that's the case.
k-paxian
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers