Я хочу добавить файл изображения в объект json. Можно ли добавить файл изображения в объект json?
Я пробовал под кодом, но не работал? Поскольку я хочу отправить этот json-объект серверу, сервер будет читать мой файл изображения и хранить его в этой базе данных.
JSONObject test = new JSONObject();
test.put("photo",new File(// Here i set image uri));
Поэтому, когда я печатаю этот объект json, он показывает мне путь к изображению, где хранится изображение. Мне нужен файл для отправки его на сервер.