I have a JSONArray that contains image files in Base64 format.
I would like to decode the images in Byte list.
My json array format:
jsonarray:[{"manchine_image":{"image_file":"VW5pdHlGUw...}
My existing code:
List<String> image = new ArrayList<String>();
for(int i = 0; i < jsonarray.length();i++) {
JSONObject jsonobject = jsonarray.getJSONObject(i);
image.add(new String(jsonobject.toString().getBytes("image_file")));
}
I tried this but i have this error:
java.io.UnsupportedEncodingException: image_file
Thanks anyway.