json对象里面添加数据
@Test
public void vv() throws JSONException{
String a = "{'a':1,'b':2}";
JSONObject aa = new JSONObject(a);
aa.put("a", 23);
System.out.println(aa);
}
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20080701</version>
</dependency>