I'm receiving this response from a RESTful service and saving it to a JSONObject:
{
"GetCampaignsInProgressListResult": [
108,
162,
171,
103,
185,
147,
218,
16,
67,
226,
44,
// etc etc
]
}
The data above represents a binary array. I am trying to read it with the following code:
String rawResponse = client.getResponse();
JSONArray entries = null;
JSONObject o = new JSONObject(rawResponse);
entries = new JSONArray(o.getString("GetCampaignsInProgressListResult"));
I would like to access the binary data and save it to a byte array, but since it does not have an attributes name I can't use:
for (int i = 0; i < entriesLength; i++) {
JSONObject entry = entries.getJSONObject(i);
Object something = entry.getString("SomeTag");
}
How can I access the binary array?