This gets sadder.
This mixin class:
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public abstract class NameMixin {
String text = "";
ISO15924 script = ISO15924.Zyyy;
LanguageCode languageOfUse = LanguageCode.UNKNOWN;
LanguageCode languageOfOrigin = LanguageCode.UNKNOWN;
@JsonCreator
public NameMixin() {
//
}
@JsonCreator
public NameMixin(@JsonProperty("text") String text,
@JsonProperty("script") ISO15924 script,
@JsonProperty("languageOfOrigin") LanguageCode
languageOfOrigin,
@JsonProperty("languageOfUse") LanguageCode languageOfUse,
@JsonProperty("extendedProperties") Map<String,
Object> extendedProperties) {
//
}
}
results in:
com.fasterxml.jackson.databind.JsonMappingException: Class
com.basistech.rosette.dm.Name has no default constructor; can not
instantiate default bean value to support
'properties=JsonSerialize.Inclusion.NON_DEFAULT' annotation (through
reference chain: java.util.ArrayList[0])
at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1042)
at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:445)
at com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap.findAndAddSecondarySerializer(PropertySerializerMap.java:95)
So it got the Inclusion property, but it won't use the provided
default constructor?