1、从实体类到JSON字符串
Gson gson = new Gson();
String jsonBDID = gson.toJson(bdPushID);
2、从JSON字符串到实体类
Gson gson = new Gson();
BDPushID bdPushID2 = gson.fromJson(bdPushId, BDPushID.class);
3、从JSON数组到ArrayList
Gson gson = new Gson();
Car cars = gson.fromJson(result,new TypeToken