Answer the question
In order to leave comments, you need to log in
Java: What is the correct way to send byte[] (image) to be processed into json?
Good afternoon!
There is a database in which there is an image (jpg) in byte[], also in the database is the name of the client and his last name. Using the method, I get the Client (first name, last name, image), and accept using ajax - dataType: "json", everything is displayed well except for the image. Tell me how to correctly implement sending data or process them correctly upon receipt?
Answer the question
In order to leave comments, you need to log in
An image in JSON is a bust, where have you seen this?
In JSON, you need to transfer a link to the image ... Or better, only its id, and then let JavaScript form a link with the id, since in JSON you generally need to transfer a minimum of bytes, it is already not parsed very quickly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question