I want to have the ability to define the json property name instead of changing my entity definition, in this case from theName to name. Is this possible today somehow?
I think this is possible by adding custom annotations like @JsonProperty etc. something like this
@dataclass
class Car
@propertyname('name')
theName: str
There is actually a feature that allows you to do this. Check out key_transformer in the api. It is a keyword argument that takes a function that transforms a key name.
Use case: entity definition
external resource (json)
I want to have the ability to define the json property name instead of changing my entity definition, in this case from
theName
toname
. Is this possible today somehow?I think this is possible by adding custom annotations like
@JsonProperty
etc. something like this