Skip to content Skip to sidebar Skip to footer

Retrofit - Java.lang.illegalstateexception: Expected Begin_array But Was Begin_object

I am trying to parse my own JSON, but getting JSONSyntaxException, here is how my JSON looks: { 'type':'success', 'value':[ { 'id':1, 'title

Solution 1:

In your Master.java class, your name is not an array!

privateList<Name> name = new ArrayList<Name>();

Change to this instead and try:

private Name name;

Actually by seeing the logs of the exception you can tell this.

Post a Comment for "Retrofit - Java.lang.illegalstateexception: Expected Begin_array But Was Begin_object"