Examples of substituteTemplates()


Examples of com.senseidb.util.JsonTemplateProcessor.substituteTemplates()

    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));
  }

  @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.