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

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 Harish Dabade
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5
via Stack Overflow by DMR
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via Stack Overflow by Satish Dhiman
, 2 years ago
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 15
via co.uk by Unknown author, 1 year ago
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 15
via Stack Overflow by Seth Olsen
, 4 months ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
via Stack Overflow by Charles
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 1
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
at com.google.gson.Gson.fromJson(Gson.java:795)
at com.google.gson.Gson.fromJson(Gson.java:761)
at com.google.gson.Gson.fromJson(Gson.java:710)
at com.infy.service.DSprojectClient.main(DSprojectClient.java:30)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 6 months ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 3 weeks ago
2 times, 8 months ago
47 more bugmates

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