小编Fra*_*she的帖子

Gson 预期 BEGIN_ARRAY 但在第 1 行第 2 列路径 $ 处为 BEGIN_OBJECT

这是我的数组列表

 ArrayList<Eat> eatList = gson.fromJson(jsonString, new 
 TypeToken<ArrayList<Eat>>() {
            }.getType());
Run Code Online (Sandbox Code Playgroud)

这是我的 json:http : //www.mocky.io/v2/592fdc32110000ef12b392cc

这是我的模型

public class Eat{

private String title,firstItemTitle,firstItemSutitle,
secondItemTitle,secondItemSutitle,
firstItemPrice,secondItemPrice,
firstItemImage,secondItemImage;


public String getTitle() {
    return title;
}

public void setTitle(String title) {
    this.title = title;
}

public String getFirstItemTitle() {
    return firstItemTitle;
}

public void setFirstItemTitle(String firstItemTitle) {
    this.firstItemTitle = firstItemTitle;
}

public String getFirstItemSutitle() {
    return firstItemSutitle;
}

 public void setFirstItemSutitle(String firstItemSutitle) {
    this.firstItemSutitle = firstItemSutitle;
 }

 }
Run Code Online (Sandbox Code Playgroud)

android json android-volley

3
推荐指数
1
解决办法
6393
查看次数

未找到React-native命令ubuntu 16.04

我安装react-native 我安装nodejs 我设置路径当我确实sudo react-native init AwesomeProject 给我react-native: command not found

react-native ubuntu-16.04

2
推荐指数
1
解决办法
4973
查看次数