这是我的数组列表
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) 我安装react-native
我安装nodejs
我设置路径当我确实sudo react-native init AwesomeProject
给我react-native: command not found