Monday, 30 November 2015

RetrofitErrorHandler: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $




RetrofitErrorHandler: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $


If you see above error, don't worry, it is very easy to solve, that because your java model and the response json from your api doesn't match.

Your java model's field is an object, but the api returns your an array.



No comments:

Post a comment