@Override public JSONArray getJSONArray(int index) { return new FastJSONArray(jsonArray.getJSONArray(index)); }
@Override public JSONArray getJSONArray(int index) { return new FastJSONArray(jsonArray.getJSONArray(index)); }
public Message(JSONObject json) { JSONArray cont = json.getJSONArray("content"); this.font = cont.getJSONArray(0).getObject(1, Font.class); final int size = cont.size(); final StringBuilder contentBuilder = new StringBuilder(); for (int i = 1; i < size; i++) { contentBuilder.append(cont.getString(i)); } this.content = contentBuilder.toString(); this.time = json.getLongValue("time"); this.userId = json.getLongValue("from_uin"); }
public GroupMessage(JSONObject json) { JSONArray cont = json.getJSONArray("content"); this.font = cont.getJSONArray(0).getObject(1, Font.class); final int size = cont.size(); final StringBuilder contentBuilder = new StringBuilder(); for (int i = 1; i < size; i++) { contentBuilder.append(cont.getString(i)); } this.content = contentBuilder.toString(); this.time = json.getLongValue("time"); this.groupId = json.getLongValue("group_code"); this.userId = json.getLongValue("send_uin"); }
JSONArray resultArray = jsonArray.getJSONArray(1); String[] result = new String[resultArray.size()]; for (int i = 0; i < resultArray.size(); i++) {
public DiscussMessage(JSONObject json) { JSONArray content = json.getJSONArray("content"); this.font = content.getJSONArray(0).getObject(1, Font.class); this.content = content.getString(1); if (content.size() > 2) this.content += content.getString(3); this.time = json.getLongValue("time"); this.discussId = json.getLongValue("did"); this.userId = json.getLongValue("send_uin"); }
@Override public JSONArray getJSONArray(int index) { return new FastJSONArray(jsonArray.getJSONArray(index)); }
@Override public JSONArray getJSONArray(int index) { return new FastJSONArray(jsonArray.getJSONArray(index)); }
@Override public JSONArray getJSONArray(int index) { JSONArray value = super.getJSONArray(index); if (value == null || value instanceof JSONArrayWrapper) { return value; } else { value = new JSONArrayWrapper(value); set(index, value); return value; } }
for(int i = 0;i <terms.size();++i){ ArrayList<String> list = new ArrayList(); JSONArray term = terms.getJSONArray(i); if(term.size()==2){ list.add(term.getString(0));
for(int i = 0;i <terms.size();++i){ ArrayList<String> list = new ArrayList(); JSONArray term = terms.getJSONArray(i); if(term.size()==2){ list.add(term.getString(0));
Content contentMsg = new Content(); value.setContent(contentMsg); Font font = FastJson.toObject(contentArray.getJSONArray(0).get(1).toString(), Font.class); contentMsg.setFont(font);