In my app I'm creating a JSON object. Somewhere along the way I insert floats (location longitude and latitude) in it.
Then send it to server.
When I get it from the server and try parsing it, I realized there is no getFloat method?
Will getInt do the job or should I save it as a String?
JSONObject object has no “getFloat” method. What do I do?
with JSON you use getDouble() (docs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With