Package loxia.support.json

Examples of loxia.support.json.JSONArray


    result.put("page", isPagable());
    result.put("pageSize", getItemPerPage());
    result.put("currentPage", getCurrentPage());
    result.put("itemCount", getCount());
    if(filterStr == null || filterStr.trim().length() ==0)
      result.put("data", new JSONArray(getItems()));
    else
      result.put("data", new JSONArray(getItems(),filterStr));
    return new JSONObject(result);
  }
View Full Code Here


        if(exceptionMap != null){
          logger.debug("Exception found:" + exceptionMap);
          Map<String,Object> resultMap = new HashMap<String, Object>();
          Map<String,Object> eMap = new HashMap<String, Object>();
          eMap.put("obj", new JSONObject(exceptionMap.get("exception")));
          eMap.put("message", new JSONArray((List<String>)exceptionMap.get("errorMessages")));
          resultMap.put("exception", new JSONObject(eMap));
          if(exceptionMap.get("invalidToken") != null){
            resultMap.put("invalidToken", true);
            resultMap.put("token", exceptionMap.get("token"));
          }
View Full Code Here

TOP

Related Classes of loxia.support.json.JSONArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.