How to send complex JSON structure from angular to spring controller
<p>I've a JSON like below in my angular controller, which i need to post to Spring controller.</p>

<pre><code>var items={"A":"aa",
           "B":"bb",
           "C":{"D":"dd", "E":"ee"}
           };

$http.post('localhost:8082/ProjectName/posting',items)
.success(function(data,status,headers, config){
   alert("success");
})
.error(function(error){
    alert(error);
});
</code></pre>

<p>In my Spring controller </p>

<pre><code>@RestController
public class ForPost{
  @RequestMapping(value="/posting",method=RequestMethod.POST)
  public @ResponseBody List  forPosting(@RequestBody PostingModel postingModel){
    System.out.println("Print all values received");
    .
    .
    .
    .
  }
}
</code></pre>

<p><em>I'm thinking for this kind of nested JSON, I need to have nested POJO.
something like:</em></p>

<pre><code>public class PostingModel{
 String A;
 String B;
 POJOForC C;
 /* getter setter below*/
}

puublic class POJOForC{
 String D;
 String E;
 /* getter setter below*/
}
</code></pre>

<p>I get error message: <strong>The request sent by client was syntactically incorrect().</strong>
Am I accepting the values correctly? Need to fix something in POJO?</p>