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

Stack Overflow | raghu | 1 month ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    gson deserialisition of same key different values in json

    Stack Overflow | 1 month ago | raghu
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: This is not a JSON Array.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      This is not a JSON Array.

      at com.google.gson.JsonElement.getAsJsonArray()
    2. Gson
      JsonElement.getAsJsonArray
      1. com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:106)
      1 frame
    3. Unknown
      FieldaDeserialisation.deserialize
      1. FieldaDeserialisation.deserialize(FieldaDeserialisation.java:18)
      2. FieldaDeserialisation.deserialize(FieldaDeserialisation.java:1)
      2 frames
    4. Gson
      TreeTypeAdapter$GsonContextImpl.deserialize
      1. com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
      2. com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
      3. com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
      4. com.google.gson.Gson.fromJson(Gson.java:887)
      5. com.google.gson.Gson.fromJson(Gson.java:952)
      6. com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162)
      6 frames
    5. Unknown
      JsonDataDeserialisation.deserialize
      1. JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:20)
      2. JsonDataDeserialisation.deserialize(JsonDataDeserialisation.java:1)
      2 frames
    6. Gson
      Gson.fromJson
      1. com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
      2. com.google.gson.Gson.fromJson(Gson.java:887)
      2 frames
    7. Unknown
      JsonMainClass.main
      1. JsonMainClass.main(JsonMainClass.java:15)
      1 frame