Hello all,
I am using json to communicate with the server.
I want to post and grab an image from the server.
How to convert the image in json format to send it, also when we get an image in json format and convert it back to image.
Hello all,
I am using json to communicate with the server.
I want to post and grab an image from the server.
How to convert the image in json format to send it, also when we get an image in json format and convert it back to image.
Image is binary - you would be probably better send link to the image in your JSON otherwise you need to deal with base64
Please refer to the relevant section of the HTML spec for how to properly upload binary data.
JSON objects are posted using a very inefficient encoding for binary data. Utilizing the existing frameworks and standards for uploading binary data will save you a tremendous amount of time.