Package com.senseidb.util.JSONUtil

Examples of com.senseidb.util.JSONUtil.FastJSONArray


    {
      JSONArray ids = null;
      if ("post".equalsIgnoreCase(req.getMethod()))
      {
        BufferedReader reader = req.getReader();
        ids = new FastJSONArray(readContent(reader));
      }
      else
      {
        String jsonString = req.getParameter("json");
        if (jsonString != null)
          ids = new FastJSONArray(jsonString);
      }

      query = "get=" + String.valueOf(ids);

      String[] vals = RequestConverter2.getStrings(ids);
View Full Code Here


    assertTrue(_comp.isEquals(json, expected));

    JsonTemplateProcessor jsonProc = new JsonTemplateProcessor();
    json.put(JsonTemplateProcessor.TEMPLATE_MAPPING_PARAM,
             new FastJSONObject().put("user_age",
                                  new FastJSONArray().put(25)));
    JSONObject newJson = jsonProc.substituteTemplates(json);
    JSONObject expected2 = new JSONObject("{\"facetInit\":{\"member\":{\"age\":{\"values\":[25],\"type\":\"int\"}}},\"templateMapping\":{\"user_age\":[25]},\"meta\":{\"select_list\":[\"*\"],\"variables\":[\"user_age\"]}}");
    assertTrue(_comp.isEquals(newJson, expected2));
  }
View Full Code Here

TOP

Related Classes of com.senseidb.util.JSONUtil.FastJSONArray

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.