I have a basic POJO with a property of type int
.
...
@Json(name = "partner_id") int partner_id = 1;
...
After serialization it logs this in the JSON as:
...
"partner_id":1.0
...
How can I prevent conversion to double
if I wish to send partner_id
as int
, the way it's modeled?
Update. I'm using moshi-jsonapi, a json:api-compliant fork of Square's Moshi.