通常,Json对象将包含您的值(包括数组)作为其中的命名字段。因此,类似:
JSonObject jo = new JSonObject();JSonArray ja = new JSonArray();// populate the arrayjo.put("arrayName",ja);在JSON中将是{“ arrayName”:[…]}。

通常,Json对象将包含您的值(包括数组)作为其中的命名字段。因此,类似:
JSonObject jo = new JSonObject();JSonArray ja = new JSonArray();// populate the arrayjo.put("arrayName",ja);在JSON中将是{“ arrayName”:[…]}。