String转JSONObject

      String elecAddress = TengXunAPIUtil.getDetailByGPS(Double.parseDouble(parkinglot.getLongitude()),Double.parseDouble(parkinglot.getLatitude()),1);
      if (elecAddress != null && !elecAddress.equals("")) {
    JSONObject json = new JSONObject(elecAddress);
    JSONObject addressJson = new JSONObject(json.get("result").toString());
    carSate.setElecAddress(addressJson.get("address").toString());
   }

posted @ 2017-09-21 18:13  JLCUI  阅读(6402)  评论(0编辑  收藏  举报