티스토리 뷰
안드로이드/코틀린
[Android Studio]Response<ResponseBody> JSON 결과값 받기 코틀린 return response kotlin
eqrw105 2021. 4. 22. 00:13[Android Studio]Response<ResponseBody> JSON 결과값 받기 코틀린 return response kotlin
open fun response_ui(response: Response<ResponseBody>){
//JSON 형태의 문자열 타입
val str = response.body()!!.string() as String
try{
val jsonArray = JSONArray(str)
for (i in 0 until jsonArray.length()){
val jsonObject = jsonArray.getJSONObject(i)
Log.d("field value => ",jsonObject.get("filed_name").toString())
}
}catch (e: Exception){
e.printStackTrace()
}
}
'안드로이드 > 코틀린' 카테고리의 다른 글
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- gitlab mirror
- rn 오픈소스 라이센스
- next useEffect
- 깃랩 잔디 옮기기
- 깃랩에서 깃허브로
- 커밋 이메일 변경
- Android Studio
- amplify next.js
- next.js useEffect
- 안드로이드 해시키
- 깃허브 잔디 옮기기
- 안드로이드 스튜디오
- room error
- react.js useEffect
- rn oss
- 안드로이드 스튜디오 해시키
- 카카오 해시키
- nextjs ssr deploy
- Build failed because of webpack errors
- 깃허브에서 깃랩으로
- kotlin
- react native 오픈소스 라이선스
- kakao api notworking
- non-zero exit code detected
- github mirror
- amplify build error
- 코틀린
- next.js ssr deploy
- 라이브러리 라이센스
- react native oss
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
글 보관함