JSONObject removes decimal dot, if round number JSONObject removes decimal dot, if round number json json

JSONObject removes decimal dot, if round number


Kudos should go to Perception for the comment:

Use a different JSON library (JSON Simple, Gson, Jackson). All the mentioned preserve at leave one decimal place of precision when serializing floating point numbers.

Used JSON Simple, which worked as expected.