로딩
요청 처리 중입니다...

JSON 파싱

 JSON 파싱

JSON 파싱 JSON 결과 값 : "accesstoken": "22228", "type": "Bearer", "expired": "ubin" 위의 결과 값에서 type값만 추출 하기 response.body().string() -> json 값 String responsetest = response.body().string(); JSONParser parser = new JSONParser(); Object obj; try { obj = parser.parse(responsetest); JSONObject jsonObj = (JSONObject) obj; // type 값 추출 accesstoken = (String) jsonObj.get("type"); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); }...

# java # json # JSONObject # JSONParser # JSON파싱 # 이클립스 # 자바

원문 링크 : JSON 파싱