I'm trying to send a POST request in Retrofit for below JSON.
{"data":["dog playing football",45,256,256,2,5]}
I have sent the same request using Volley. Now I'm switching to Retrofit.
val data = JSONObject()
val arr = JSONArray()
arr.put(inputText)
arr.put(steps)
arr.put(width)
arr.put(height)
arr.put(numberOfImages)
arr.put(diversityScale)
data.put("data", arr)
How can I send the same using Retrofit?