Jsonobject jobj = jsonobject.fromobject (conditions = = null?) "{}"
: conditions);
Iterator it = Jobj.keys ();
String InfoType = "FCCs";
while (It.hasnext ()) {
String key = It.next (). toString ();
Remove all empty strings
if (stringutil.getstring (jobj.getstring (key) = = null) {
continue
}
if ("InfoType". Equals (Key)) { //reagent type
if ("FCCs". Equals (Jobj.getstring (key)) {
InfoType = "FCCs";
} else if ("HS". Equals (Jobj.getstring (key)) {
InfoType = "HS";
}
}
/** * @Title: Jsonstrtrim * @author: JSW * @date: 2012-12-7 * @time: Morning 09:19:18 * @Description: Passing in String type JSON
Space * @param jsonstr * @return * @exception:(exception description) */Public Jsonobject Jsonstrtrim (string jsonstr) {
Jsonobject reagobj = Jsonobject.fromobject (JSONSTR);
Remove the space for the value of the field in the Jsonobject iterator ITT = Reagobj.keys ();
while (Itt.hasnext ()) {String key = Itt.next (). toString ();
String value = reagobj.getstring (key);
if (value = = null) {continue;
}else if ("". Equals (Value.trim ())) {continue;
}else{reagobj.put (Key, Value.trim ());
} return reagobj; /** * @Title: Jsonstrtrim * @author: JSW * @date: 2012-12-7 * @time: Morning 09:21:48 * @Description: Incoming Jsonobject Remove space * @param jsonstr * @return * @exception:(exception description)/public jsonobject Jsonstrtrim (Jsonobject jsonstr) {JSO
Nobject reagobj = jsonstr;
Remove the space for the value of the field in the Jsonobject iterator ITT = Reagobj.keys (); while (Itt.hasnext ()) {String key = Itt.next (). toString ();
String value = reagobj.getstring (key);
if (value = = null) {continue;
}else if ("". Equals (Value.trim ())) {continue;
}else{reagobj.put (Key, Value.trim ());
} return reagobj; /** * @Title: Jsonstrtrim * @author: JSW * @date: 2012-12-7 * @time: Morning 11:48:59 * @Description: Jsonarry
The value value in the Jsonobject place before and after the space * @param arr * @return * @exception:(exception description)/public Jsonarray Jsonstrtrim (Jsonarray arr) { if (arr!= null && arr.size () > 0) {for (int i = 0; i < arr.size (); i++) {Jsonobject obj
= (jsonobject) arr.get (i);
Remove the space for the value of the field in the Jsonobject iterator ITT = Obj.keys ();
while (Itt.hasnext ()) {String key = Itt.next (). toString ();
String value = obj.getstring (key);
if (value = = null) {continue;
}else if ("". Equals (Value.trim ())) {continue; }else{Obj.put (Key,Value.trim ());
} arr.set (i, obj);
} return arr;
}