Closed dennisa closed 9 years ago
I think this actually belongs to https://github.com/FasterXML/jackson-jaxrs-providers/issues unless the issue can be reproduced outside of JAX-RS container (in which case it'd belong to https://github.com/FasterXML/jackson-databind/issues).
If you could refile there, that'd be useful. But one more piece of information is needed: resource definition, to show the type declaration of the value to return.
I have a class defined as
@JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = MyEvent.class, name = "myevent"), }) public abstract class Event
{
private D data;
...
}
My event is defined as public class MyEvent extends Event
{
}
And User is defined as
public class User { @JsonView({ Views.Meta.class }) private final String username;
private final String first;
private final String last; }
However, in my JaxRS web service the username is still getting serialized out when inside the MyEvent class, but on its won (standalone User) it excludes the serialization of the username.