Is there a way to clone an instance of org.json.JSONObject
without stringifying it and reparsing the result?
A shallow copy would be acceptable.
Use the public JSONObject(JSONObject jo, java.lang.String[] names)
constructor and the public static java.lang.String[] getNames(JSONObject jo)
method.
JSONObject copy = new JSONObject(original, JSONObject.getNames(original));