public static CounterQuery fromJsonString(String json) {
   Object o = JsonUtils.parse(json);
   if (o instanceof Map) {
     @SuppressWarnings({"unchecked", "rawtypes"})
     Map<String, List<String>> params = cast(toMapList((Map) o));
     return fromQueryParams(params);
   }
   return null;
 }
Example #2
0
 public void dump(String name, Object obj) {
   if (obj != null && LOG.isInfoEnabled()) {
     LOG.info(name + ":\n" + JsonUtils.mapToFormattedJsonString(obj));
   }
 }