When I am parsing JSON response using Retrofit, I am getting the below error:
Expected BEGIN_ARRAY but was BEGIN_OBJECT
My JSON response is :
{"Hints":"Within past week?,Within past month?,Within past year?,2000s?,1990s?,1980s?,1970s?,1960s?,Natural disaster?,Political?,Sports-related?,Movies-related?,Music-related?,Technology/Science?,Headline News?,International News?,Regional/Local News?"}
And Model Class:
public class User {
String Hints;
public String getHints() {
return Hints;
}
public void setHints(String Hints) {
this.Hints = Hints;
}
public User() {
}
public User(String Hints) {
this.Hints = Hints;
}
}
And the Interface is :
public interface UserService {
@GET("/getCategoryHints/3")
void getUser(Callback<List<User>> callback);
}
Please let me know the possible cause for this error.