Retrofit2.0 gets MalformedJsonException while the json seems correct?

Finally I solved my problem which is not related to the json lenient mode, something wrong with my POST response (there some other non json output before the json data).

Here is the response from JakeWharton regarding how to set Gson lenient mode:

make sure that you haveļ¼šcompile ''

Gson gson = new GsonBuilder()

Retrofit retrofit = new Retrofit.Builder()

Leave a Comment