java - How to modify values of JsonObject / JsonArray directly? -
Once I have provided a JSON string in the GSOn, then the JsonObject class provides (assuming I Do not want to parse any meaningful data objects, but want to use Jason OBaze strictly), how can I modify the field / value of a key directly?
I do not want an API that can help me
Strangely, to continue adding the answer property back, I was expecting a setter method for half: system
System.out.println ( "Before:" + obj.get ("DebugLogId")); // Original "02352" obj.addProperty ("DebugLogId", "YYY"); System.out.println ("After:" + obj.get ("DebugLogId")); // now "YYY"
Comments
Post a Comment