com.google.gson.JsonSyntaxException

java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

Solutions on the web820

  • via blogspot.com by Unknown author, 9 months ago
    java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column
  • via GitHub by negue
    , 9 months ago
    java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
  • java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
  • Stack trace

    • com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:221) at com.google.gson.Gson.fromJson(Gson.java:814) at com.google.gson.Gson.fromJson(Gson.java:779) at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:36) at retrofit.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:24) at retrofit.OkHttpCall.parseResponse(OkHttpCall.java:148) at retrofit.OkHttpCall.access$100(OkHttpCall.java:29) at retrofit.OkHttpCall$1.onResponse(OkHttpCall.java:94) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:387) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210) ... 12 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

    6 times, 1 month ago
    9 times, 3 months ago
    11 times, 4 months ago
    4 times, 5 months ago
    9 times, 7 months ago
    53 more bugmates