com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5

Stack Overflow | Harish Dabade | 2 months ago
  1. 0

    I am working on json and getting the error returned a response status of 400 Bad Request

    Stack Overflow | 2 months ago | Harish Dabade
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 5
  2. 0

    Convert JSON String to different java Objects in java

    Stack Overflow | 2 years ago | jags kk
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 14
  3. 0

    Create an object from JSON (GSON: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING)

    Stack Overflow | 4 years ago | user2144555
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 226
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    store objects in android gson

    Stack Overflow | 4 years ago | ant
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2
  6. 0

    Help!Forge 1.6.2 isn't working!

    minecraftforge.net | 11 months ago
    com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 3583

  1. Indri Yunita 4 times, last 1 week ago
  2. nasimk 1 times, last 2 weeks ago
  3. Alexandru Popa 96 times, last 2 weeks ago
  4. iridic 6 times, last 3 weeks ago
  5. bmacedo 36 times, last 1 week ago
14 more registered users
52 unregistered visitors
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

    Expected BEGIN_OBJECT but was STRING at line 1 column 5

    at com.google.gson.stream.JsonReader.expect()
  2. Gson
    Gson.fromJson
    1. com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
    2. com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
    3. com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
    4. com.google.gson.Gson.fromJson(Gson.java:795)
    5. com.google.gson.Gson.fromJson(Gson.java:761)
    6. com.google.gson.Gson.fromJson(Gson.java:710)
    7. com.google.gson.Gson.fromJson(Gson.java:682)
    7 frames
  3. com.infy.service
    DSprojectClient.main
    1. com.infy.service.DSprojectClient.main(DSprojectClient.java:30)
    1 frame