You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.PROPERTY, property = "objectType")
@JsonSubTypes({
@JsonSubTypes.Type(value = ObjectDto.class, name = "NONE"),
@JsonSubTypes.Type(value = Object1Dto.class, name = "OBJ1"),
@JsonSubTypes.Type(value = Object2Dto.class, name = "OBJ2")}
)
@JSONMapper
public class ObjectDto {
....
}
@JSONMapper
public class ObjectDto1 extends ObjectDto {
....
}
@JSONMapper
public class ObjectDto2 extends ObjectDto {
....
}
generation falls, because files for ObjectDto will be generated twice (in generateSubTypesDeserializers and on generate)...
in DeserializerGenerator.generate (and SerializerGenerator.generate too)
public String generate(TypeMirror beanType) {
....
// may be subtypes must be generated after TypeRegistry.registerDeserializer called????
generateSubTypesDeserializers(beanType);
TypeRegistry.addInActiveGenDeserializer(beanType);
new AptDeserializerBuilder(packageName, beanType, filer).generate();
TypeRegistry.registerDeserializer(
Type.stringifyTypeWithPackage(beanType), ClassName.bestGuess(deserializerName));
The text was updated successfully, but these errors were encountered:
in this example code
generation falls, because files for ObjectDto will be generated twice (in generateSubTypesDeserializers and on generate)...
in
DeserializerGenerator.generate
(andSerializerGenerator.generate
too)The text was updated successfully, but these errors were encountered: