java简单拼接json格式的easyui-tree

public void MyGroupList(){
AccountSession accountSession = ((AccountSession) getSessionObj("sessiongzlxadmin"));
accountSession.getAccountid();
//用户id查询分组
Map argMap = new HashMap();
argMap.put("accountid", accountSession.getAccountid());
//获取用户的分组
List grouplist = _gzlxService.selectAllByMapParam("T_GZLX_GROUP_selectAllByMapParam", argMap);

JSONArray jsonListFz = new JSONArray();
JSONObject jsonObejectfz = new JSONObject();
jsonObejectfz.put("id", "0");
jsonObejectfz.put("text", "我的分组");

JSONArray jsonArrayCy = new JSONArray();
for (int i = 0; i < grouplist.size(); i++) {
JSONObject jsonObejectZm = new JSONObject();
GroupInfo group=(GroupInfo)grouplist.get(i);
jsonObejectZm.put("id", group.getId());
jsonObejectZm.put("text", group.getGroupname());
jsonObejectZm.put("state", "closed");
Map argMap2 = new HashMap();
argMap2.put("groupid", group.getId());
List groupMemberlist = _gzlxService.selectAllByMapParam("T_GZLX_GROUP_MEMBER_selectAllByMapParam", argMap2);
//组名下成员
JSONArray jsonArrayMember = new JSONArray();
for (int j = 0; j < groupMemberlist.size(); j++) {
JSONObject jsonObejectPerson = new JSONObject();
GroupMemberInfo groupMemberInfo=(GroupMemberInfo)groupMemberlist.get(j);
jsonObejectPerson.put("id", groupMemberInfo.getAccountid());
jsonObejectPerson.put("text", groupMemberInfo.getLxrxm());
jsonArrayMember.add(jsonObejectPerson);
}
if(jsonArrayMember.size() == 0){
JSONObject jsonObejectPerson1 = new JSONObject();
jsonObejectPerson1.put("id", "0");
jsonObejectPerson1.put("text","无");
jsonArrayMember.add(jsonObejectPerson1);
}
jsonObejectZm.put("children", jsonArrayMember);
jsonArrayCy.add(jsonObejectZm);

}
jsonObejectfz.put("children",jsonArrayCy);
jsonListFz.add(jsonObejectfz);
System.out.println(jsonListFz.toString());
this.renderText(jsonListFz.toString());
}