I want to retrieve a JSON object from Okhttp3 response. Service sends an image as a byte array with its status in a JSON object.
Server response as follows:
{
"msg":"success",
"msg_code":"001",
"file":"<200 OK OK,URL [file:/E:/storage/bbb.jpg],[Content-Type:\"image/jpeg\"]>"
}
I can retrieve image when the service directly send byte array as the response, using response.body().bytes()
But I couldn't when the service sends image data inside JSON object.