Expected BEGIN_ARRAY but was BEGIN_OBJECT

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Expected BEGIN_ARRAY but was BEGIN_OBJECT相关的知识,希望对你有一定的参考价值。

Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 3519 path $.data[1].inspector_user

Gson 中 ""引起来的是STRING, {} 是类,[] 是List

我代码中是这样写的 private List<String> inspector_user

         private inspectorUser inspector_user;//改写后

以上是关于Expected BEGIN_ARRAY but was BEGIN_OBJECT的主要内容,如果未能解决你的问题,请参考以下文章

Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2

为啥 Gson fromJson 会抛出 JsonSyntaxException: Expected BEGIN_OBJECT but was BEGIN_ARRAY?

Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

安卓报错编译失败Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $

Gson 解析Json数据时候报错: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

使用改造调用服务时出错 Expected BEGIN_ARRAY 但在第 1 行第 1 列路径 $ 处为 STRING