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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Parth Panchal
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via Stack Overflow by Charlotte1993
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
via csdn.net by Unknown author, 2 years ago
via Stack Overflow by selva simon p
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via stackapps.com by Unknown author, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 12
via GitHub by kroepke
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:387)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210)
at com.google.gson.Gson.fromJson(Gson.java:814)
at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:36)
at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:24)
at retrofit.OkHttpCall.parseResponse(OkHttpCall.java:148)
at retrofit.OkHttpCall.access$100(OkHttpCall.java:29)
at retrofit.OkHttpCall$1.onResponse(OkHttpCall.java:94)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

2 times, 4 weeks ago
6 times, 7 months ago
9 times, 9 months ago
11 times, 10 months ago
4 times, 10 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.