May I have a chance of deserializing a collection field using a getter only?
public List<Some> getSome() { // JAXB used to work with this.
if (some == null) {
some = new ArrayList<>();
}
return some;
}
//public void setSome(List<Some> some) {
// this.some = some;
//}
private List<Some> some;
+1, we have a flag in johnzon for that (feature is named "use getter as writer" for collections).
There are a few cases it makes sense - often when reusing jaxb model as mentionned.
Apologies whenever this issue is not appropriate.
May I have a chance of deserializing a collection field using a getter only?
Thank you.