If needed, it is also easy to customize the naming strategy.
For example, if the API returns objects with snake_case,
and you want to use lowerCamelCase in your models,
you can use the @JsonKey annotation with a name parameter:

/// Tell json_serializable that "registration_date_millis" should be

/// mapped to this property.

@JsonKey

name:

'registration_date_millis'

final

int

registrationDateMillis

It’s best if both server and client follow the same naming strategy.
@JsonSerializable() provides fieldRename enum for totally converting dart 
fields into JSON keys.

Modifying @JsonSerializable(fieldRename: FieldRename.snake) is equivalent to
adding @JsonKey(name: '<snake_case>') to each field.