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

Stack Overflow | raghu | 3 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    gson deserialisition of same key different values in json

    Stack Overflow | 3 months 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