JSON格式:
{newProcessId:'',newActDefUniqueId:''}//key可以不加引号,value必须有
构造方法:
JSONObject obj = new JSONObject();
obj.put( "name" , "feiniu5566");
obj.put( "age" ,23);
out.print(obj.toString());
举例:
{ "programmers": [ { "firstName": "Brett", "lastName":"McLaughlin", "email": "aaaa" },], "authors": [{ "firstName": "Isaac", "lastName": "Asimov", "genre": "science fiction" },] }
JsonObject obj=new JsonObject();
JsonObject obj2=new JsonObject();
JsonObject obj3=new JsonObject();
obj2.put("firstName","Brett");
obj2.put("lastName","McLaughlin");
obj2.put("email","aaaa"