I have a json
{
"params": [
{
"key": "path",
"options": {
"string": {
"prefix": "test_pref"
}
},
"default": {
"url": ""
}
}
]}
I have the following POJO class, where i want to map inner objects like option.string.prefix in json to prefix in Params POJO class.
@Data
@Accessors(chain = true)
public class Data {
private List<Params> params;
}
@Data
@Accessors(chain = true)
public class Params {
private String key;
@JsonProperty("options.string.prefix")
private String prefix;
@JsonProperty("default.url")
private String url;
}
Is there any Jackson annotation that helps me do this without @JsonProperty?