String转JSONObject

Posted JLCUI

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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());
   }






以上是关于String转JSONObject的主要内容,如果未能解决你的问题,请参考以下文章