Just a quick question:
If I have a json object that contains a "key / value" like:
"name":"value"
and I want to change parts of the name to something else, what should I do? I don't want to delete and do it again.
Correct and compact implementation, given that jsonObject - this is the json object you are accessing and this is an instance jsonObject :
jsonObject
jsonObject.put("new name", jsonObject.remove("name"));
Create a new object with a new value
new JSONObject(jsonobject.toString().replace("\"name\":","\"newvalue\":");)