Exemplo n.º 1
0
 public static HttpParameter setParameterValue(String json) throws Exception {
   JSONObject jsonMap = JSONObject.fromObject(json);
   @SuppressWarnings("unchecked")
   Set<String> set = jsonMap.keySet();
   HttpParameter httpParameter = new HttpParameter();
   String value = "";
   for (String key : set) {
     value = jsonMap.get(key) == null ? "" : jsonMap.getString(key);
     if (StringUtils.isNotBlank(value)) {
       httpParameter.add(key, value);
     }
   }
   return httpParameter;
 }