ho il seguente file JSON:Jackson: Ignora JSON valore di configurazione
{
"segments": {
"externalId": 123,
"name": "Tomas Zulberti",
"shouldInform": true,
"id": 4
}
}
Ma il modello di Java è la seguente:
public class Segment {
private String id;
private String name;
private boolean shouldInform;
// getter and setters here...
}
Quando Jackson è l'analisi solleva un'eccezione becuase non c'è getter o setter per il campo "externalId". C'è un decoratore che può essere usato per ignorare un campo JSON?
Il collegato FasterXML Jackson wiki non esiste più. – jackthehipster