How to Post map data inside ArrayList as form-data by postman

i am Posting a Map data as ArrayList.
So i have tried it by Raw body. but i need to post it as Form-Data.
I tried it by many ways but i didn’t get result. if any one knows the solution, how to do it. please give me solution.

and here is my code belove.

    @Id
    private String id;

    @Field(value = "name")
    private String name;

    @Field(value = "description")
    private String description;

        @Field(value = "attributes")
        private List<Map<String, String>> attributes = new ArrayList<Map<String, String>>();

    this is what i am sending in Body Raw i want to post it by Form-Data

    {
        "name":"Fourth Template",
        "description":"covers most of selected attributes",
        "attributes": [
        {
          "attributeId": "5d4284807748181cbc8a8277",
          "selectedDataSource": "collections"
        },
         {
          "attributeId": "5d4284807748181cbc8a8277",
          "selectedDataSource": "paycom"
        },
         {
          "attributeId": "5d4284807748181cbc8a8277",
          "selectedDataSource": "originations"
        }
      ]
    }

2
Leave a Reply

avatar
2 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

Instead of posting it as raw data, in postman you’ve form-data beside raw data, you can post your formData through it.

See the image link for your reference:

Posting a Map data as ArrayList

Jason
Guest

show your controller method, try add @RequestBody Entity or @RequestBody Map map.