I want inject property to class before induce fromJson.
PrimitiveDocument document = null;
document = (PrimitiveDocument) gson.fromJson(requestBody.toString(), AcceptPathDocument.class);
In AcceptPathDocument induce constructor PrimitiveDocument:
if (!this.getApplicationTag().equals("")) {
Database db = Master.getDB(this.getApplicationTag());
try {
this.doc = db.createDocument();
this.setForm(this.getForm());
} catch (Exception e) {
e.printStackTrace();
}
}
but I have applicationTag in requestBody so when this code is running applicationTag is empty. How I can inject application tag from requestbody before induce fromJson?