I'm using jsonschema2pojo, and some of my fields need special serialization/de-serialization. How do I set that up in the json schema?
Here's my schema so far:
"collegeEducation": {
"javaJsonView": "com.trp.erd.common.util.Views.InvestmentProfessionalListView",
"type": "array",
"position": 37,
"items": {
"$ref": "#/definitions/CollegeEducation"
}
},
And need the resulting property to look like this:
@JsonProperty("collegeEducation")
@JsonView(Views.InvestProfessionalView.class)
@JsonSerialize(using = JsonListSerializer.class)
@JsonDeserialize(using = JsonListDeserializer.class)
@Valid
private List<CollegeEducation> collegeEducation = new ArrayList<CollegeEducation>();