I'm trying to parse this array:
[{"style_image":"","count":5,"color":"red","ClusterName":"cluster1","CID":"[98,99,96,16,95]"},
{"style_image":"","count":1,"color":"red","ClusterName":"cluster2","CID":"[91]"}]
and I'm having with the "CID":"[98,99,96,16,95]" object. I get JsonParseException exceptions if my object looks like this:
@SerializedName("ClusterName")
private String name;
private String color;
@SerializedName("CID")
private List<Integer> levelOneIDs;
private int count;
private String style_image;
or this:
@SerializedName("ClusterName")
private String name;
private String color;
@SerializedName("CID")
private int[] levelOneIDs;
private int count;
private String style_image;
How do I parse the object with the array of integers in the object? It seems something easy enough, but I'm not sure how to do it.