读书人

jquery file upload 上传后的回调展示

发布时间: 2013-11-29 00:21:24 作者: rapoo

jquery file upload 上传后的回调显示

https://github.com/blueimp/jQuery-File-Upload/wiki/Setup

?

?

package com.test;

import java.util.HashMap;
import java.util.Map;

import net.sf.json.util.JSONStringer;

import com.fr.json.JSONArray;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;

public class TestJson {

?public static void main(String[] args) throws JSONException {
??JSONArray jArray = new JSONArray();
??JSONArray jArray2 = new JSONArray();

??JSONObject jObject = new JSONObject();
??jObject.put("id", "001");
??jObject.put("name", "001");

??Map map = new HashMap();

??JSONObject a = new JSONObject();
??a.put("id", "001");
??a.put("name", "001");

??JSONObject b = new JSONObject();
??b.put("id", "001");
??b.put("name", "001");
??jArray.put(a);
??jArray.put(b);

??map.put("files", jArray);
??jArray2.put(map);

??System.out.println("========ss=========");
??System.out.println(jArray2 + "");
?}
}

class User {

?private String id;
?private String name;

?public String getId() {
??return id;
?}

?public void setId(String id) {
??this.id = id;
?}

?public String getName() {
??return name;
?}

?public void setName(String name) {
??this.name = name;
?}

}

读书人网 >开源软件

热点推荐