Package com.alibaba.fastjson

Examples of com.alibaba.fastjson.JSONArray


      cppn.setPhoneID(o.getPhoneID());
      cppn.setIsSend(false);
      cppn.setMessageID(pnm.getEncodedKey());
      cppn_service.add(cppn);

      JSONArray phoneArray = retJson.getJSONArray("phoneArray");
      if (null == phoneArray)
        phoneArray = new JSONArray();

      phoneArray.add(o.getPhoneID());
      retJson.put("phoneArray", phoneArray);
    }

    return retJson;
  }
View Full Code Here


        pcpn.setPhoneID(phoneID);
        pcpn.setIsSend(false);
        pcpn.setMessageID(pnm.getEncodedKey());
        pcpn_service.add(pcpn);

        JSONArray carArray = retJson.getJSONArray("carArray");
        if (null == carArray)
          carArray = new JSONArray();

        carArray.add(o.getCarID());
        retJson.put("carArray", carArray);
      }
    }

    return retJson;
View Full Code Here

    else
      filter = String.format("devID=='%s' && addTime>'%s'", carID, lastTime);

    List<DeviceUpload> du_list = du_service.getPaginationData(filter, "addTime asc").getResultList();
    retJson = new JSONObject();
    JSONArray array = new JSONArray();
    for (DeviceUpload du : du_list) {
      JSONObject duJson = new JSONObject();
      duJson.put("addTime", du.getAddTime());
      duJson.put("mySerial", du.getMySerial());
      duJson.put("blob_key", du.getBlob_key());
      duJson.put("serving_url", du.getServing_url());
      array.add(duJson);
    }
    retJson.put("items", array);

    return retJson;
  }
View Full Code Here

                    }

                    object.put(key, value);
                } else if (ch == '[') { // 减少嵌套,兼容android
                    lexer.nextToken();
                    JSONArray list = new JSONArray();
                    this.parseArray(list, key);
                    value = list;
                    object.put(key, value);

                    if (lexer.token() == JSONToken.RBRACE) {
View Full Code Here

                    case LBRACE:
                        JSONObject object = new JSONObject();
                        value = parseObject(object, i);
                        break;
                    case LBRACKET:
                        Collection items = new JSONArray();
                        parseArray(items, i);
                        value = items;
                        break;
                    case NULL:
                        value = null;
View Full Code Here

                lexer.nextToken();
                TreeSet<Object> treeSet = new TreeSet<Object>();
                parseArray(treeSet, fieldName);
                return treeSet;
            case LBRACKET:
                JSONArray array = new JSONArray();
                parseArray(array, fieldName);
                return array;
            case LBRACE:
                JSONObject object = new JSONObject();
                return parseObject(object, fieldName);
View Full Code Here

                    }

                    object.put(key, value);
                } else if (ch == '[') { // 减少嵌套,兼容android
                    lexer.nextToken();
                    JSONArray list = new JSONArray();
                    this.parseArray(list, key);
                    value = list;
                    object.put(key, value);

                    if (lexer.token() == JSONToken.RBRACE) {
View Full Code Here

                    case LBRACE:
                        JSONObject object = new JSONObject();
                        value = parseObject(object, i);
                        break;
                    case LBRACKET:
                        Collection items = new JSONArray();
                        parseArray(items, i);
                        value = items;
                        break;
                    case NULL:
                        value = null;
View Full Code Here

                lexer.nextToken();
                TreeSet<Object> treeSet = new TreeSet<Object>();
                parseArray(treeSet, fieldName);
                return treeSet;
            case LBRACKET:
                JSONArray array = new JSONArray();
                parseArray(array, fieldName);
                return array;
            case LBRACE:
                JSONObject object = new JSONObject();
                return parseObject(object, fieldName);
View Full Code Here

                    }

                    object.put(key, value);
                } else if (ch == '[') { // 减少嵌套,兼容android
                    lexer.nextToken();
                    JSONArray list = new JSONArray();
                    this.parseArray(list, key);
                    value = list;
                    object.put(key, value);

                    if (lexer.token() == JSONToken.RBRACE) {
View Full Code Here

TOP

Related Classes of com.alibaba.fastjson.JSONArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.