List of usage examples for org.json JSONObject append
public JSONObject append(String key, Object value) throws JSONException
From source file:biblivre3.circulation.UsersDTO.java
@Override public JSONObject toJSONObject(Properties properties) { JSONObject json = new JSONObject(); try {// w w w . j ava 2 s. c om json.put("totalPages", this.totalPages); json.put("totalRecords", this.totalRecords); json.put("currentPage", this.currentPage); json.put("recordsPerPage", this.recordsPerPage); for (UserDTO user : this.users) { json.append("results", user.toJSONObject(null)); } } catch (JSONException e) { } return json; }