나는 키 subpage
이 있으며 유형 String[]
의 값을 원하는 분야jcr 노드에 저장된 문자열 배열에 어떻게 액세스 할 수 있습니까? 내 JCR 노드에서
{"title":"some title1", "url":"some url1"}
{"title":"some title2", "url":"some url2"}
{"title":"some title3", "url":"some url3"}
{"title":"some title4", "url":"some url4"}
이 어떻게이 자바에서 액세스 할 수 있습니까?
내가 시도 :
ValueMap contentValueMap = resource.getValueMap();
String subpages = contentValueMap.get("subpage", String.class);
System.out.println(subpages);
하지만 첫 번째 문자열을 출력합니다
{"title":"some title1", "url":"some url1"}
가 어떻게 그들의 나머지를 도달 할 수있다? AWD는
String[] subPages = contentValueMap.get("subpage", String[].class);
작품을 언급하고 권장되는 솔루션으로
감사합니다. 사용할 수는 있지만 계속 진행하는 방법을 모르거나 내 경우 도움이 될 수 있습니다. ( – randomuser1