Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @JsonProperty(value="Contact")
- @NotNull(message = "ContactUser or CompanyName is required.")
- @Valid
- @XmlElements(value = {
- @XmlElement(name = "ContactUser", type = ContactUser.class, required = true),
- @XmlElement(name = "CompanyName", type = String.class, required = true) })
- private Object contactInfo;
- "Contact":{
- "ContactUser":{
- "Title": "Miss",
- "LastName": "Hello"
- }
- }
- "Contact": "Hello Company"
- "ContactUser":{
- "Title": "Miss",
- "LastName": "Hello"
- }
- "CompanyName": "Hello Company"
- <CompanyName>Hello Company</CompanyName>
- <ContactUser>
- <Title>Miss</Title>
- <LastName>Hello</LastName>
- </ContactUser>
- @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include =JsonTypeInfo.As.WRAPPER_OBJECT, visible=true)
- @JsonSubTypes({
- @JsonSubTypes.Type(name = "ContactUserJ", value = ContactUser.class),
- @JsonSubTypes.Type(name = "CompanyNameJ" , value = String.class)
- })
Add Comment
Please, Sign In to add comment