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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

This means you had a syntax problem in your serialization/deserialization, check the Gson javadoc to check the right syntax: https://goo.gl/g7LnZb

,
Expert tip

This seems to be a bug in the-blue-alliance, fixed in version 4.2.3 (link for github in case you want the changelog: https://goo.gl/NQAKUf ). If you're not using it, it might be that you're parsing xml as json.

Solutions on the web

via GitHub by henjue
, 1 year ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
via GitHub by gikarasojo
, 3 months ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
via Stack Overflow by seaguest
, 1 year ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
via Stack Overflow by Unknown author, 2 years ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12
via GitHub by cdongieux
, 9 months ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
via Stack Overflow by Devan Carlson
, 1 year ago
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
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(JsonReader.java:1566)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1416)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:597)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:429)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:201)
at com.google.gson.TypeAdapter.fromJson(TypeAdapter.java:260)
at com.mentornow.app.android.network.compontent.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:23)
at com.mentornow.app.android.network.compontent.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:13)
at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)
at com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:194)
at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)
at rx.Subscriber.setProducer(Subscriber.java:211)
at com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:174)
at com.mentornow.app.android.network.compontent.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:159)
at rx.Observable.unsafeSubscribe(Observable.java:8741)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)

Users with the same issue

9 times, 4 months ago
Once, 5 months ago
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 11 months ago
6 times, 1 year ago
30 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.