0
안드로이드/자바 구조 JSON 만들기 :는 내가하고 싶은
(Object)Date:
(Object)HomeTeam:
(Array)Name
(Array)Num
(Object)AwayTeam:
(Array)Name
(Array)Num
(Object)Date:
(Object)HomeTeam:
(Array)Name
(Array)Num
(Object)AwayTeam:
(Array)Name
(Array)Num
(Object)Date:
(Object)HomeTeam:
(Array)Name
(Array)Num
(Object)AwayTeam:
(Array)Name
(Array)Num
를 지금까지 내가하려 :
JSONObject json = new JSONObject();
JSONObject home = new JSONObject();
JSONObject away = new JSONObject();
json.put("Date", xxx); I dun know how to do
json.put("HomeTeam", home);
json.put("AwayTeam", away);
그리고 많은 날짜 객체가, 도와주세요 ..
더 나은 라이브러리를 사용하십시오. 예를 들어, [Jackson] (https://github.com/FasterXML/jackson-databind). 안드로이드에 번들로 제공되는 JSON 라이브러리는 매우 제한적입니다. JSON을 올바르게 탐색 할 수 없으며, Jackson의 'JsonNode'가 JSON을 탐색하여 다른 곳보다 훨씬 뛰어나며 등을 직렬화 할 수 있습니다 – fge