com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: This is not a JSON Array.

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 raghu
, 10 months ago
java.lang.IllegalStateException: This is not a JSON Array.
via Stack Overflow by Andy Chan
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 2 column 16 path $.
via GitHub by cama
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING
via Stack Overflow by Sunny
, 2 years ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 74 at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
via gutefrage.net by Unknown author, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1
via Stack Overflow by Urma Tilekov
, 1 year ago
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
java.lang.IllegalStateException: This is not a JSON Array.
at undefined.FieldaDeserialisation.deserialize(FieldaDeserialisation.java:18)
at undefined.FieldaDeserialisation.deserialize(FieldaDeserialisation.java:1)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:952)
at undefined.JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:20)
at undefined.JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:1)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at undefined.JsonMainClass.main(JsonMainClass.java:15)

Users with the same issue

You are the first who have seen this exception.

Write tip

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