com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT

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 GitHub by sabrinawilske
, 10 months ago
java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT
via gutefrage.net by Unknown author, 11 months ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 3 column 1
via GitHub by SuperTian007
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
via Stack Overflow by Kayvar
, 1 year ago
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 186 path $.
via Stack Overflow by Bolic
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
via GitHub by hmspain
, 1 year ago
Expected a com.g oogle.gson.JsonObject but was com.google.gson.JsonPrimitive at
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT
at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:741)
at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.read(TypeAdapters.java:717)
at com.google.gson.Gson.fromJson(Gson.java:805)
at com.google.gson.Gson.fromJson(Gson.java:870)
at clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145)
at clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:42)
at clarifai2.dto.model.ModelVersion$Adapter$1.deserialize(ModelVersion.java:31)
at clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173)
at com.google.gson.Gson.fromJson(Gson.java:805)
at com.google.gson.Gson.fromJson(Gson.java:870)
at clarifai2.internal.InternalUtil.fromJson(InternalUtil.java:145)
at clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:211)
at clarifai2.dto.model.Model$Adapter$2.deserialize(Model.java:197)
at clarifai2.internal.JSONAdapterFactory$Adapter.read(JSONAdapterFactory.java:173)
at com.google.gson.Gson.fromJson(Gson.java:805)
at clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:34)
at clarifai2.api.request.model.GetModelRequest$1$1.fromJSON(GetModelRequest.java:32)
at clarifai2.api.request.ClarifaiRequest$Impl.executeSync(ClarifaiRequest.java:285)
at clarifai2.api.request.ClarifaiRequest$Builder.executeSync(ClarifaiRequest.java:192)
at clarifai2.dto.model.DefaultModels.update(DefaultModels.java:52)
at clarifai2.dto.model.DefaultModels.access$000(DefaultModels.java:10)
at clarifai2.dto.model.DefaultModels$1.run(DefaultModels.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Users with the same issue

Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
47 more bugmates

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