我正在使用一个对其 jsons 属性使用 lowercase_with_underscores 命名约定的 api:
{
"user_id": 0,
"full_name": ""
}
我的built_value 类是:
abstract class User implements Built<User, UserBuilder> {
//...
@BuiltValueField(wireName: "user_id")
int get userId;
@BuiltValueField(wireName: "full_name")
String get fullName;
//...
}
有没有办法更改所有built_value 类的built_value 序列化程序命名约定,以便它自动将my_property
json 分配给myProperty
built_value 模型,而不是BuiltValueField(wireName: "my_property")
用于每个属性?