I have the follow JSON (from URL)
["Rock","Rock Argentino","Reggaeton","En Español","Reggaeton ","Reggaeton ","Boleros","Italianos ","Cumbias ","Cumbia ","Internacional","Internacional "]
You can see that there isn't a "name attribute" for these fields.
My class model is the follow
public class KaraokeCategoryModel {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
but the GSON doesnt reconize my atribute "name"
Type karaokeCollection = new TypeToken<Collection<KaraokeCategoryModel>>() {}.getType();
_karaoke_cartegory_response = new Gson().fromJson(reader, karaokeCollection);
later I create the adapter
_karaoke_category_adapter = new KaraokeCategoryAdapter(getSupportActionBar().getThemedContext(), R.layout.spinner_item, _karaoke_cartegory_response);
getSupportActionBar().setListNavigationCallbacks(_karaoke_category_adapter, this);
What should I do to make GSON used my model without problems?