title: Spring MVC get Jackson JSON as parameter
body: <p>Hello In frist time I want apologize if my english isn't so good
  I want send Multipart request to the server by Apache HttpClient. This request consist from several types of parts. One of these part is JSON. JSON is created by Jackson.</p>
  
  <pre><code>        HttpClient httpclient = new DefaultHttpClient();
          httpclient.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
          HttpPost httppost = new HttpPost("http://xxx.xxx.xxx.xx:8080/synchronize");
          HttpResponse response =null;
          CProject project = new CProject();
          project.setId(10L);
          project.setName("name");
          ObjectMapper mapper = new ObjectMapper();
  
          String json = mapper.writeValueAsString(project);
          MultipartEntity multipart = new MultipartEntity( HttpMultipartMode.BROWSER_COMPATIBLE);
  
          multipart.addPart("project", new StringBody(json,"application/json",Charset.forName("UTF-8")) );
          httppost.setEntity(multipart);
          response = httpclient.execute(httppost);
  </code></pre>
  
  <p>Structure of CProject is very simple</p>
  
  <pre><code>public class CProject implements Serializable{
      private Integer id;
      private String name;
  }
  </code></pre>
  
  <p>And I wand catch this request on server as parameter with anotations @RequestParam or @ModelAttribute but no with @RequestBody because this catch full request - and I need send multiply parameters(Multipart Entity).</p>
  
  <p>Code on server</p>
  
  <pre><code>@RequestMapping (value = "/synchronize", method = RequestMethod.POST)
      public @ResponseBody
      List&lt;Object&gt; getRequest (@RequestParam CProject project, HttpServletResponse response)
      {
              return null;
  
      }
  </code></pre>
  
  <p>Problem is that variable project is created but its atributes are null.
  I try several tutorials on net what works with @RequestBody and send request on server and set full header  as "application/json". And my application works if I change header of full request as JSON and send them on server, and catch this as @RequestBody on server this work. But I need send json as parameter. </p>
  
  <p>Thanks for any ideas.</p>