com.google.gson.stream.MalformedJsonException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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

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.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • How to resolve gzip response
    via GitHub by xiaoxie
    ,
  • Fatal Error
    via GitHub by fangeugene
    ,
  • How to get malformed JSON in Retrofit 2
    via Stack Overflow by Renier
    ,
  • Editing Config
    via GitHub by lmk-chris
    ,
  • wialon remote api login with java
    via Stack Overflow by Altynbek
    ,
    • 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:1567) 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.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:74) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25) at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211) at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.execute(ExecutorCallAdapterFactory.java:89) at com.mohit.dictionaryapp.DictionaryApi.searchMeaning(DictionaryApi.java:33) at com.mohit.dictionaryapp.GetMeaningTask.doInBackground(GetMeaningTask.java:27) at com.mohit.dictionaryapp.GetMeaningTask.doInBackground(GetMeaningTask.java:13) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)

    Users with the same issue

    Unknown User
    1 times, last one,
    nasimk
    1 times, last one,
    Unknown visitor1 times, last one,
    Handemelindo
    6 times, last one,
    Unknown visitor1 times, last one,
    30 more bugmates