☞ java片段:
private String jsonStr;
public String getJsonStr() {
return jsonStr;
}
public void setJsonStr(String jsonStr) {
this.jsonStr = jsonStr;
}
public String jsonStrToObject() {
JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for(int i = 0; i < jsonArray.size(); i++) {
String JOStr = jsonArray.getString(i);
JSONObject JO = JSONObject.fromObject(JOStr);
RbGoods goods =(RbGoods)JSONObject.toBean(JO, RbGoods.class);
System.out.println(goods.getGoodsCd());
}
return SUCCESS;
}
function newchePoint(obj) {
return "<che id=\""+obj.id+
"\" type=\""+obj.type+"\" value=\"\"/>\r\n";
}