Posts

Showing posts with the label retrofit2

how can i post nested json objects to server in retrofit [duplicate]

how can i post nested json objects to server in retrofit [duplicate] This question already has an answer here: How can I post to the server? I need to post an JSON object using Retrofit 2. My JSON object is { "test_id":5, "user_id":null, "org_id":2, "schedule_id":15, "group_id":null, "next_section_id":"", "current_section": {} } This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. 2 Answers 2 make give json into one pojo class and pass into api calling like.. @POST("path") Call<ResponseData> passJsonData(@Body JsonData jsonData); // here pass your request data pojo class object.. when calling that time only create object and pass all data into object and pass into api call meth...