-2
In my Android project I need to generate the following Json result:
{"value":164.40}
However, how to remove the quotes from the String result?
JSONObject json = new JSONObject();
json.put("value", "164.40");
The return is coming with quotes:
{"value":"164.40"}
Ever tried to get past the Apas
json.put("value", 164.40);
?– novic
Which package you are using?
– novic
The value is a pre-formatted String return. I am using the org.json.Jsonobject package
– felipearon
If you did what I said
json.put("value", 164.40);
?– novic
Read what I wrote, it’s no use me putting it in hand...
– felipearon
You put in your question fixed data if it is a String being a text and that is your doubt you have to pass to number? is that your doubt? if you are not clear in your questions it is difficult to understand your doubt.
– novic
I passed as an example, "164.40" is a result of the type String (coming from elsewhere). But I have already solved with Leonardo.
– felipearon