I am developing an Android App with a Java Backend using Spring Data JPA. One of my classes represents a profile image and contains the following field:
@Lob
@Column(name = "image")
private byte[] image;
When i invoke the Rest API that saves the above class the JSON request looks like this:
{"image":"[B@23bafb3"}
Then the described error occurs. I have seen suggestions of declaring the image as string and then get the bytes but this does not seem a good practice to me.