I have this Json file and would like to have help in parsing them and setting the Country,State and City list to my autocomplete Text views in android . I have separate feilds for them. Any help?
{
"Countries":[
{
"CountryName":"India",
"States":[
{
"StateName":"Maharashtra",
"Cities":[
"Pune",
"Nagpur",
"Mumbai"
]
},
{
"StateName":"Kerala",
"Cities":[
"Kochi",
"Munnar"
]
}
]
},
{
"CountryName":"Australia",
"States":[
{
"StateName":"Aukland",
"Cities":[
"GlenField",
"Henderson",
"MilFord"
]
},
{
"StateName":"Melbourne",
"Cities":[
"Melbourne",
"South Oakleigh"
]
}
]
}
]
}
Edit 1 :See this link for actual file https://github.com/sagarshirbhate/Country-State-City-Database/blob/master/Contries.json I want to have 3 separate arrays of strings from the above code having Country names , State names for each country , and then City names using the country and State name.
Edit 2:I am not understanding how can I parse the models. I want to parse them for auto complete text boxes