title: Need help to deserialize json with Jackson from Spring-boot
body: <p>I'm trying to POST a Json to my REST service, but I'm getting error with charset, I did a very simple example that reproduces my error.</p>
  
  <p>Simple model Person</p>
  
  <pre><code>public class Person {
  
      public Person() {}
  
      private String name;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  }
  </code></pre>
  
  <p>Simple rest controller:</p>
  
  <pre><code>@RestController
  public class PersonController {
  
      @RequestMapping(value={"/person"}, method=RequestMethod.POST, consumes="application/json", produces="application/json")
      public @ResponseBody ResponseEntity&lt;String&gt; newPerson(@RequestBody Person person) {     
          return new ResponseEntity&lt;String&gt;(person.getName(), HttpStatus.OK);     
      }
  
  }
  </code></pre>
  
  <p>When I POST json:</p>
  
  <pre><code>{
      "name":"Joao"
  }
  </code></pre>
  
  <p>works fine, I got a 200 OK and "Joao" on my response body.</p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: Apache-Coyote/1.1
  X-Application-Context: application
  Content-Type: application/json;charset=UTF-8
  Content-Length: 4
  Date: Mon, 25 May 2015 19:09:56 GMT
  
  Joao
  </code></pre>
  
  <p>but if I try a json with a LATIN character like</p>
  
  <pre><code>{
      "name":"João"
  }
  </code></pre>
  
  <p>I got the following error:</p>
  
  <pre><code>HTTP/1.1 400 Bad Request
  Server: Apache-Coyote/1.1
  X-Application-Context: application
  Content-Type: application/json;charset=UTF-8
  Transfer-Encoding: chunked
  Date: Mon, 25 May 2015 19:12:56 GMT
  Connection: close
  
  {"timestamp":1432581176997,"status":400,"error":"Bad Request","exception":"org.springframework.http.converter.HttpMessageNotReadableException","message":"Could not read JSON: Invalid UTF-8 middle byte 0x6f\n at [Source: java.io.PushbackInputStream@10b0d4cd; line: 2, column: 14] (through reference chain: com.example.model.Person[\"name\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Invalid UTF-8 middle byte 0x6f\n at [Source: java.io.PushbackInputStream@10b0d4cd; line: 2, column: 14] (through reference chain: com.example.model.Person[\"name\"])","path":"/person"}
  </code></pre>
  
  <p>I'm using spring-boot 1.2.3.RELEASE and it has jackson 2.5.1 as dependency.</p>
  
  <p>I could not find a solution to this problem, any suggestions?</p>