public JSONObject convertLeadersToJson(List<Leader> leaders) throws JSONException {
    JSONArray userList = new JSONArray();
    JSONObject finalObj = new JSONObject();

    for (Leader leader : leaders) {
      List<PRInfo> prs = leader.getPullRequests();
      JSONObject userInfo = new JSONObject();
      userInfo.put("slug", leader.getSlug());
      userInfo.put("displayName", leader.getDisplayName());
      JSONArray prArray = new JSONArray();
      for (PRInfo pr : prs) {
        JSONObject prInfo = new JSONObject();
        prInfo.put("id", pr.getId());
        prInfo.put("date", pr.getDate());
        prInfo.put("role", pr.getRole().toString());
        prArray.put(prInfo);
      }
      userInfo.put("pullRequests", prArray);
      userList.put(userInfo);
    }
    finalObj.put("users", userList);
    return finalObj;
  }