public static JSONObject jsonTest()
{
JSONObject jsonObject = null;
JSONObject userCommentJson = null;
JSONArray data = new JSONArray();
try{
for (int i = 0; i < 10; i++) {
userCommentJson = new JSONObject();
userCommentJson.put("userContent", "说的好");
userCommentJson.put("replyUserName", "普京");
userCommentJson.put("replyUserId", "10");
userCommentJson.put("replyCommentId", "2");
userCommentJson.put("goodNum", "499");
userCommentJson.put("userToken", "1");
userCommentJson.put("userCodeId", "1(腾讯qq)");
userCommentJson.put("userHead", "");
userCommentJson.put("userCity", "深圳");
data.put(userCommentJson);
}
jsonObject = new JSONObject();
jsonObject.put("state", "1");
jsonObject.put("data", data);
}catch(JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return jsonObject;
}