Hi, I have written a little article on how to write and read JSON in RPGLE
It can be found here:
It can be found here:


JSONObject jImage = new JSONObject();
Bitmap bm = setImageToImageView("/mnt/sdcard/IMG001.JPG");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 100, baos);
// bitmap object
byte[] byteArrayImage = baos.toByteArray();
String encodedImage = Base64.encodeToString(byteArrayImage,Base64.DEFAULT);
jImage.put("ImageID", "IMG0001");
jImage.put("Image", encodedImage);
Comment