com.google.gson.JsonSyntaxException

java.lang.IllegalStateException: This is not a JSON Array.


Solutions on the web597

Solution icon of github
via GitHub by JoeNoIce
, 7 months ago
java.lang.IllegalStateException: This is not a JSON Array.

Solution icon of github
via GitHub by 10xephos01
, 1 year ago
java.lang.IllegalStateException: This is not a JSON Array.

Solution icon of stackoverflow
java.lang.IllegalStateException: This is not a JSON Array.

Solution icon of github
java.lang.IllegalStateException: This is not a JSON Array.

Solution icon of github
via GitHub by wsargent
, 1 year ago
java.lang.IllegalStateException: Not a JSON Object: "????"

Solution icon of github
java.lang.IllegalStateException: Not a JSON Object: "<b>Welcome"

Solution icon of github
java.lang.IllegalStateException: Not a JSON Object: "<html>"

Solution icon of stackoverflow
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT

Solution icon of github
via GitHub by mchugh19
, 1 year ago
java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 79 path $.info[0].Target

Solution icon of github
java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 132

Stack trace

  • com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: This is not a JSON Array. at com.google.gson.Gson.fromJson(Gson.java:899) at com.google.gson.Gson.fromJson(Gson.java:952) at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) at JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:20) at JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:1) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.Gson.fromJson(Gson.java:887) at JsonMainClass.main(JsonMainClass.java:15) Caused by: java.lang.IllegalStateException: This is not a JSON Array. at com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:106) at FieldaDeserialisation.deserialize(FieldaDeserialisation.java:18) at 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) ... 7 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.