0

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.

es0329
  • 1,366
  • 1
  • 18
  • 35

1 Answers1

0

@kirisetsz was kind enough to take the time to recognize this as a bug in his library, and published a fix. Thanks again!

Community
  • 1
  • 1
es0329
  • 1,366
  • 1
  • 18
  • 35