JSON: JsonMappingException tout essayer pour désérialiser un objet avec des valeurs null

J'essaie de désérialiser un objet qui contient la valeur null-propriétés et ont la JsonMappingException.

Ce que je fais:

String actual = "{\"@class\" : \"PersonResponse\"," +
                "  \"id\" : \"PersonResponse\"," +
                "  \"result\" : \"Ok\"," +
                "  \"message\" : \"Send new person object to the client\"," +
                "  \"person\" : {" +
                "    \"id\" : 51," +
                "    \"firstName\" : null}}";
ObjectMapper mapper = new ObjectMapper();
mapper.readValue(new StringReader(json), PersonResponse.class); //EXCEPTION!

MAIS: si à jeter "firstName = null" propriété - tout fonctionne très bien!
Je veux dire passer à la chaîne suivante:

String test = "{\"@class\" : \"PersonResponse\"," +
                "  \"id\" : \"PersonResponse\"," +
                "  \"result\" : \"Ok\"," +
                "  \"message\" : \"Send new person object to the client\"," +
                "  \"person\" : {" +
                "    \"id\" : 51}}";
ObjectMapper mapper = new ObjectMapper();
mapper.readValue(new StringReader(json), PersonResponse.class); //ALL WORKS FINE!

Question:
Comment éviter cette exception ou de nantissement de Jackson ignorer null-valeurs au cours de la sérialisation?

Jette:

Message:

com.fasterxml.jackson.databind.MessageJsonException:
 com.fasterxml.jackson.databind.JsonMappingException:
  N/A (through reference chain: person.Create["person"]->Person["firstName"])

cause:

com.fasterxml.jackson.databind.MessageJsonException:
 com.fasterxml.jackson.databind.JsonMappingException:
  N/A (through reference chain: prson.Create["person"]->Person["firstName"])

cause: java.lang.NullPointerException

InformationsquelleAutor VB_ | 2013-08-07