for normal json
like
{
"text1":"going",
"text2":"sending"
}
i'm using okhttp3
as
RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart("text1",xxx)
.addFormDataPart("text2","yyy")
.build();
how do i use it to send for jsons like
{"Text1":"aaa","text2":[{"module":"bbb","Text":"xxx","params":{"lang": "eng"}}]}
addFormDataPartc
has nothing to do with JSON. You are not sending JSON this way at all. search forokhttp send json
. It should take you not more than 30 seconds to find the answer