You must first be sure that you want to do this. Perhaps there is a way to save the image as a regular file (or attachment?) On your server.
Otherwise, get byte data from the image. Then convert the byte after the byte into a huge string. Then the string can be saved as a property in your JSON object. You can use Base64 encoding.
Witek source share