Getting "malformed syntax" while hitting REST Controller POST method sending "Request Body"
<p>Here is the Rest Controller Service signature </p>

<pre><code>@RequestMapping(value = "/getFilteredReport", method = RequestMethod.POST)
 public void getFilteredReport(@RequestBody FilteredReportVO filteredReportVO,HttpServletRequest request,HttpServletResponse response) {
</code></pre>

<p>Now below is the JSON structure I am sending </p>

<pre><code>{
"filterAttributesFactory":{
"930000":{
"metaDataId":930000,
"displayText":"Select Category",
"attributeType":211009,
"userInputValue":null,
"dropDownoptions":null,
"isMandatory":false,
"isDropDown":false,
"defaultValue":null,
"isdefaultValue":false,
"constraintId":null
},
"930001":{
"metaDataId":930001,
"displayText":"Item Status",
"attributeType":211005,
"userInputValue":null,
"dropDownoptions":{
"157005":"FC - fake scrap",
 "157006":"FH - firearm hold",
 "157008":"IN - inventory"
  },
  "isMandatory":false,
  "isDropDown":true,
  "defaultValue":null,
  "isdefaultValue":false,
  "constraintId":213007
  }
 },
"reportId":132030,
"location":1202
}
</code></pre>

<p>Here is the <strong>FilteredReportVO</strong> POJO</p>

<pre><code>public class FilteredReportVO {

private HashMap&lt;Integer,FilterAttributeVO&gt; filterAttributesFactory=new HashMap&lt;Integer,FilterAttributeVO&gt;();

private Integer reportId;

private Long location; .....GETTERS and setters below
</code></pre>

<p>FilterAttributeVO pojo structure is below..</p>

<pre><code>public class FilterAttributeVO {
Integer metaDataId;
//String elementName;
String displayText;
Integer attributeType;
Object userInputValue;
Map&lt;Integer,String&gt; dropDownoptions;
Boolean isMandatory=false;;
Boolean isDropDown=false;
Object defaultValue;
Boolean isdefaultValue=false;
Integer constraintId=null;...Getters n setters..
</code></pre>

<p>I am hitting the service through POSTMAN plugin.
Getting error:</p>

<p>"The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications".</p>

<p>FYI in POSTMAN I am putting the JSON structure inside "Body", selected "raw", type as "JSON(application/json)".</p>

<p>Notice I am using 2 <strong>object</strong> <strong>type</strong> attributes <strong>userInputValue</strong> and <strong>defaultValue</strong> inside <strong>FilteredAttributeVO</strong>. R we allowed to keep object type?</p>

<p>Where is the problem here?</p>