just to make sure that is a issue with the `@Json`...
# announcements
l
just to make sure that is a issue with the
@Json
annotation, if you remove the annotation and name the variable with the name that you receive on json, it's work ?
j
So even if I leave the annotation but change the variable name to match the json, it will work correctly. So this works:
Copy code
@Json(name = "home_id") val home_id: String = "",
So the Json attribute is definitely being ignored.
l
yep, did you tried with
@field:Json
?
j
Trying now
Yes, that works and I didn’t even need to roll back the version of moshi-kotlin I was using.
So it’s not ideal, but as far as easy solutions go, I’ll take it. 🙂 Thanks for your help!
👍 1
Okay, not quite as successful as I thought. The annotations are now ignored in the non-Proguarded builds. 🙄
Seems I just can’t have it both ways.
l
hahahaha that'`s does not makes sense, the non-proguarded build should not impact the serialization
j
Yep