Wondering if anyone can help me figure out away to assign the body context to my description String variable.
Here is my JSON string
{"requirement":{"description":{"body":"This is a text"}}}
public class Requirement implements Serializable {
private String description;
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
}
I know I can use @JsonProperty("description") but my description is nested with different context. In this case I only care about the body.
private BodyModel body;and then extract the string from theBodyModelobject.