title: how to Catch exception in Jackson Spring , org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON
body: <p>Using Spring framework.. and Jackson to map Json to classes..</p>
  
  <pre><code>  {name:'abc', marks:'100'}
  </code></pre>
  
  <p>-</p>
  
  <pre><code>class student{
        String name;
        int marks;
      }
  </code></pre>
  
  <p>-</p>
  
  <p>Now this is getting mapped properly... But, if i modify JSON to </p>
  
  <pre><code> {name:'abc', marks:'ten'}
  </code></pre>
  
  <p><em>org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON</em> exception is thrown... 
  <strong><em>Now, i need to catch this exception and return some result. How to catch the exception.</em></strong></p>
  
  <p>Here is the controller: </p>
  
  <pre><code>@RequestMapping(value="xxxxxx",produces="application/json",method=RequestMethod.GET)
      public @ResponseBody String mymethod(@RequestBody Student studentData, HttpServletResponse response,
              HttpServletRequest request)
      {
          //controller code
      }
  </code></pre>