mapping - Android retrofit 2 send array as field -


 @formurlencoded      @post("mobile/order")  call<orderresult> oredertaxi(         @field("user_id") integer user_id,         @field("driver_id") integer driver_id,         @field ("locations") list<string> location); 

retrofit 2 maps elements of array , create key_value pairs `driver_id: 8

locations: 40.7830904,43.861694

locations: 40.789281071949176,43.8663412258029

locations: 40.79531973066005,43.86150989681482

locations: 40.79855839824006,43.85658267885446

but have send 1 jsonarray `

locations:[ 40.7830904,43.861694

40.789281071949176,43.8663412258029

40.79531973066005,43.86150989681482 ]

help please..


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -