How to send JSON from postman for a custom VO

Vamshi :

What is the format of JSON that I should be sending from Postman to correctly map it to my rest controller.

TfundsVO :
BigDecimal accountNum
String accountName
BigDecimal accountBal



@GetMapping("/")
public ResponseEntity<Object> getFunds(@RequestBody TfundsVO tfundsVO) {
    System.out.println(tfundsVO.getAccountNum());
}

Sample JSON used:

{
    "tfundsVO": [
     {
        "accountName": "Sam"
     } 
  ]
}

When I tried the above JSON from Postman, call goes to the getFunds method, however all the values in TfundsVO are NULL.

MaxExplode :

Just send the payload without an array

{ "account name": "test" }

And please add an application/json header as a content-type

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to send data inside an object and JSON data from postman

How to Send file and data via raw JSON from Postman

How to send JSON object as JSON String with Postman?

Send JSON Object from Postman to Restful webservices

Postman - How to send large JSON body?

Using Postman flows, how do I extract json data from a send request block response and pass that data to another send request block?

Apache Solr - send JSON query request from Postman

How to send an object in postman

How to send the nested json in POST Request via postman

Dialogflow send custom payload json from webhook

How to pass variables from JSON to postman body

How to POST json parameters from Postman to Jenkins?

How to send time value from Postman to my REST api

How te send push notifications from FCM using Postman

Postman send raw json not working

How to send a custom validation Json object for the requestbody?

Unable to send FCM from postman

How to send JSON response object from custom class to another activity android

How to send output from a custom control to a textbox

How to send data as @RequestPart in the postman

Postman - How to get a value from a JSON array inside a JSON object

How can I access VO in one application module from a VO in another application module?

How to send custom props to my custom searchPanel from devExtreme

Send nested JSON data with image/file from postman: Django REST framework

Object data send as json is not serializing in object model when calling from postman

Postman send both data in json and image

Send POST data via raw json with postman

How to create JSON file from postman collection(s)

How to extract string from link in JSON response body; POSTMAN