如何从没有字段名称的JSON数组中获取数据

时间:2019-06-27 01:25:05

标签: android arrays retrofit

在此方法中,如何使用翻新获取员工图像数据,因为在此方法中我没有字段名

{     “ ColorCode”:“红色”,     “部门”:“发展”,     “名称”:null,     “ EmployeeImage”:[         255,         216,         255,         224,         0,         16         74,         70         73,         70         0,         1,         2,         0,         0,         1,         0,         1,         0,         0,         255,         237,         0,         156,         80         104,         111,         116,         111,         115,         104,         111,         112,         32,         51,         46,         48,         0,         56         66,         73,         77,         4,         4,         0,         0,         0,         0,         0,         128,         28,         2,         103,         0,         20         106,         111,         118,         98,         48,         106,         85,         71,         79,         97,         52,         53         95,         51,         120         49,         74,         57,         49,         106,         28,         2,         40岁         0,         98,         70         66,         77,         68,         48,         49,         48,         48,         48,         97,         99,         50,         48,         51,         48,         48,         48,         48,         53         54         48,         99,         48,         48,         48,         48,         55岁         102,         49,         54         48]

我尝试过

@SerializedName(“ TeammemberName”)     私有ArrayList EmployeeImage;

public ArrayList <String> getEmployeeImage() {
    return EmployeeImage;
}

public void setEmployeeImage(ArrayList <String> employeeImage) {
    EmployeeImage = employeeImage;
}

ArrayList aa = loginDetails.getEmployeeImage();                 Toast.makeText(MainActivity.this,“” + aa.size(),Toast.LENGTH_SHORT).show();

0 个答案:

没有答案