1
아래에 json 배열을 게시했습니다. json 배열을 Java 클래스 형식 배열 또는 Android로 변환하려고합니다. 그래서 "복용량"배열을 포함한 java 배열의 모든 요소를 가져옵니다. 나를. 그냥 자바 배열을 확인하십시오.중첩 된 json 배열을 Java 배열로 변환
[
{
"_id":"58299a0ae1053c391fb95026",
"legacy_ID":3014545,
"name":"OLMESAN 20 MG TAB",
"code":"OLMESAN.",
"default_sales_price":8,
"default_purchase_price":6,
"box_quantity":30,
"foreign":false,
"__v":0,
"creation_info":{
"creation_time":"2016-11-14T11:03:38.413Z"
},
"item_type":[
{
"sub_item_type_no":"4",
"name":"TABLET",
"legacy_ID":"1061",
"creation_info":{
"creation_time":"2016-11-14T05:45:12.548Z"
},
"_id":"58294f68c08d0b186e467d9f",
"__v":"0"
}
],
"route":[
{
"name":"ORAL",
"legacy_ID":"1001",
"creation_info":{
"creation_time":"2016-11-09T12:08:15.472Z"
},
"active":"true",
"_id":"582311af5da26741ab82a00f",
"__v":"0"
}
],
"manufacturer":[
{
"other_name":"Beximco Pharma",
"name":"BEXIMCO PHARMACEUTICALS LTD",
"legacy_ID":"3000018",
"creation_info":{
"creation_time":"2016-11-12T08:41:39.229Z"
},
"active":"true",
"_id":"5826d5c379520725a8e05350",
"__v":"0"
}
],
"pack":null,
"uom":[
{
"name":"PIECE",
"legacy_ID":"10014",
"creation_info":{
"creation_time":"2016-11-09T12:01:25.858Z"
},
"_id":"58231015f37a2140e437eeaa",
"__v":"0"
}
],
"generic":null,
"doses":[
{
"en":"1 tab at noon - (after meals) - to continue.",
"bn":"১ বড়ি দুপুরে - (আহারের পর) - চলবে।",
"is_default":true,
"_id":"582815348bc48212898f63b8"
}
]
},
{
"_id":"58299a0ae1053c391fb95026",
"legacy_ID":3014545,
"name":"OLMESAN 20 MG TAB",
"code":"OLMESAN.",
"default_sales_price":8,
"default_purchase_price":6,
"box_quantity":30,
"foreign":false,
"__v":0,
"creation_info":{
"creation_time":"2016-11-14T11:03:38.413Z"
},
"item_type":[
{
"sub_item_type_no":"4",
"name":"TABLET",
"legacy_ID":"1061",
"creation_info":{
"creation_time":"2016-11-14T05:45:12.548Z"
},
"_id":"58294f68c08d0b186e467d9f",
"__v":"0"
}
],
"route":[
{
"name":"ORAL",
"legacy_ID":"1001",
"creation_info":{
"creation_time":"2016-11-09T12:08:15.472Z"
},
"active":"true",
"_id":"582311af5da26741ab82a00f",
"__v":"0"
}
],
"manufacturer":[
{
"other_name":"Beximco Pharma",
"name":"BEXIMCO PHARMACEUTICALS LTD",
"legacy_ID":"3000018",
"creation_info":{
"creation_time":"2016-11-12T08:41:39.229Z"
},
"active":"true",
"_id":"5826d5c379520725a8e05350",
"__v":"0"
}
],
"pack":null,
"uom":[
{
"name":"PIECE",
"legacy_ID":"10014",
"creation_info":{
"creation_time":"2016-11-09T12:01:25.858Z"
},
"_id":"58231015f37a2140e437eeaa",
"__v":"0"
}
],
"generic":null
}
]
왜 유 GSON를 사용하지 않는? – Dilip
arrylist 및 getter 설정자를 사용하는 모달 클래스 사용 –
[JSON을 Android에서 구문 분석하는 방법] 가능한 복제본 (http://stackoverflow.com/questions/9605913/how-to-parse-json-in-android) –