I'm looking for a good way to loop through JSON object. Looking for example how to do so. Any help is welcome. Need to convert it into Java object. I have read that best way is to use GSON, but could achieve the right result.
{
"countries":[
{
"MobileCountry":{
"id":2,
"name":"England",
"languages":[
{
"MobileLanguage":{
"code":"en",
"name":"English"
}
},
{
"MobileLanguage":{
"code":"ru",
"name":"Russian"
}
}
],
"mobile_code":"+60",
"currency_code":"EUR",
"regions":[
{
"MobileRegion":{
"region_id":2048,
"name":"trr"
}
},
{
"MobileRegion":{
"region_id":1024,
"name":"Wonderland"
}
}
]
}
},
{
"MobileCountry":{
"id":1,
"name":"Spain",
"languages":[
{
"MobileLanguage":{
"code":"esp",
"name":"Spanish"
}
},
{
"MobileLanguage":{
"code":"en",
"name":"English"
}
}
],
"mobile_code":"+456",
"currency_code":"EUR",
"regions":[
{
"MobileRegion":{
"region_id":1,
"name":"region_1"
}
},
{
"MobileRegion":{
"region_id":8,
"name":"region_2"
}
},
{
"MobileRegion":{
"region_id":32,
"name":"Region1"
}
},
{
"MobileRegion":{
"region_id":64,
"name":"GaBus"
}
}
]
}
}
]
}