threw exception [com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $] with root cause
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
代码问题好像出现在
try (JsonReader reader = new JsonReader(new InputStreamReader(entityStream, “UTF-8”))) {
return gson.fromJson(reader, genericType);
}
但是比对了一下教程的代码完全一样,其他的工具类的代码也完全一致