infinum / kotlin-jsonapix

JsonApiX is an Android, annotation processor library that was made to transform regular Kotlin classes into their JSON API representations, with the ability to serialize or deserialize them to or from strings.
Apache License 2.0
38 stars 9 forks source link

Issue with integration with SerialName annotator #57

Closed bosko-nikcevic-infinum closed 10 months ago

bosko-nikcevic-infinum commented 1 year ago

I was forced to remove the usage of SerialName annotator from KotlinX Serialization library together with HasOne/HasMany/etc annotators from JsonApiX library, as it didn't recognise the new variable name.

@ToshevIvan If you have something to add to the description of this issue or make it clearer

Screenshot 2023-11-07 at 20 46 29
thisAAY commented 1 year ago

I will look into it

ToshevIvan commented 1 year ago

So as far as I remember, when we use HasOne/HasMany kind of annotators, the field is serialized by its name, so even though the @SerialName is added it doesn't have an effect., so this leads to use the response property names with snake case or whatever are defined in there.