Tags
- Amazon
- javamap반복
- S3
- redis
- 리눅스rabbitmq설치
- AWS CloudFormation
- CloudFormation
- yumpackage
- AWS
- Heap
- rabbitmq설치방법
- dynamodb
- 자료구조
- 차이점
- java
- db
- map
- instance
- ELB
- 인스턴스
- rabbitmq설치명령어
- list
- Cognito
- cloudfront
- spring
- Iteration반복문
- jpa
- REST
- 어노테이션
- javaIteration
https://blog.naver.com/rla8860
- Today
- Total
You are a developer, not a coder.
JSON Pasing Tip 본문
SMALL
"result" : {
"groupeds": {
"790": [
{
"index": 1,
"rank": 1,
"score": 0.5,
"catId": "050",
"itId": "633",
"product": {}
}
}
다음과 같이 복잡한 구조의 JSON이 있다.
배열 -> 배열 -> 리스트 형식이다.
이럴때에는 Map의 제네릭을 이용하여 Object 묶음으로 Pasing 했지만, 꺼내쓰는걸 잘 몰라서
한참 써칭을 하고 해결을 했다.
꺼내 쓰는 방법은 아래와 같다.
for (Entry<String, List<RankingVo>> entry : apiTuple.getRankingResults().entrySet()) {
System.out.println("Cities: " + entry.getKey() + ", " + entry.getValue());
}
LIST
'Backend-Languages > Java' 카테고리의 다른 글
String, StringBuffer, StringBuilder에 대해서 (0) | 2023.05.18 |
---|---|
Java Map 반복(Iteration)시키는 3가지 방법 (0) | 2023.05.18 |
subList 알맞게 사용하는 방법 (0) | 2021.02.24 |
COLLECTIONS.EMPTY_LIST (0) | 2020.12.15 |
UUID (Universally Unique IDentifier)란? (1) | 2020.04.29 |
Comments