코딩하는 일용직 노동자

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

안드로이드

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

bacass 2020. 11. 21. 14:31

기존에 잘되던 앱에서 Retrofit으로 api를 호출하면 아래의 오류가 발생했다.

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

왜 뜬금없이 이런 오류가 나오는걸까...

구글에 검색을 해보니 
GsonConverterFactory.create() 안에 GsonBuilder를 객체를 만들어 넣어주면 해결되는 문제였다.

gson객체를 만들어서 create에 넣어준다.


나말고도 이런 오류를 경험한 사람이 많은가보다.

https://stackoverflow.com/questions/39918814/use-jsonreader-setlenienttrue-to-accept-malformed-json-at-line-1-column-1-path

 

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

What is this error ? How can I fix this? My app is running but can't load data. And this is my Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ This is my

stackoverflow.com