com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

GitHub | henjue | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GsonConverterFactory and @Streaming error

    GitHub | 8 months ago | henjue
    com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
  2. 0

    Retrofit2.0 gets MalformedJsonException while the json seems correct?

    Stack Overflow | 11 months ago | seaguest
    com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
  3. 0

    How to get malformed JSON in Retrofit 2

    Stack Overflow | 1 year ago | Renier
    com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Gson converter is broken when converting string response body

    GitHub | 1 year ago | NeoLSN
    com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $
  6. 0

    GsonConverterFactory can not handle String Response

    GitHub | 1 year ago | renierdbruyn
    com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $

    Root Cause Analysis

    1. com.google.gson.stream.MalformedJsonException

      Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $

      at com.google.gson.stream.JsonReader.syntaxError()
    2. Gson
      TypeAdapter.fromJson
      1. com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1566)
      2. com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1416)
      3. com.google.gson.stream.JsonReader.doPeek(JsonReader.java:597)
      4. com.google.gson.stream.JsonReader.peek(JsonReader.java:429)
      5. com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:201)
      6. com.google.gson.TypeAdapter.fromJson(TypeAdapter.java:260)
      6 frames
    3. com.mentornow.app
      GsonResponseBodyConverter.convert
      1. com.mentornow.app.android.network.compontent.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:23)
      2. com.mentornow.app.android.network.compontent.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:13)
      2 frames
    4. retrofit2
      OkHttpCall.execute
      1. retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116)
      2. retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
      3. retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
      3 frames
    5. com.mentornow.app
      RxJavaCallAdapterFactory$RequestArbiter.request
      1. com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:194)
      1 frame
    6. rxjava
      OperatorSubscribeOn$1$1.setProducer
      1. rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)
      2. rx.Subscriber.setProducer(Subscriber.java:211)
      3. rx.internal.operators.OperatorSubscribeOn$1$1.setProducer(OperatorSubscribeOn.java:76)
      3 frames
    7. com.mentornow.app
      RxJavaCallAdapterFactory$CallOnSubscribe.call
      1. com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:174)
      2. com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:159)
      2 frames
    8. rxjava
      ScheduledAction.run
      1. rx.Observable.unsafeSubscribe(Observable.java:8741)
      2. rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
      3. rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
      3 frames
    9. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:237)
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
      6. java.lang.Thread.run(Thread.java:761)
      6 frames