How to send a post request for the following format:

"type":"edit_user", обязательное "user_data":{ "access_key":"XXXX", обязательное "pass":"", пароль зашифрованный md5. сам пароль не делжен быть меньше 6 символов "email":"", "surname":"", "name":"", "patronymic":"", "birthdate":"", в формате timestamp "pol":"" 0- мужской, 1-женский } 

With the first pair it’s understandable, you can use regular json.put, which takes form field value, but what about the array?

    1 answer 1

    The put method of JSONObject (as I understand it, it’s about him) can also take JSONArray and JSONObject as an argument.

    • I understand this, I do not understand in what format to provide this data to him. It turns out so json.put ("parameter_name", jsonArray) - makavelka
    • one
      Yes exactly. - falstaf