I have usecase to enable custom serialization for one of the field. I’m trying to implement the same using below snippet.
@JsonSerialize(using = CustomSerializer.class)
private CustomDTO customDto;
Error says :
java: Annotation @JsonSerialize specifies attribute 'contentUsing'. Currently supported attributes include: [as]
Any other alternative way to introduce custom serialization in micronaut ?
Exact scenario :
Need to introduce custom serialiser / deserialiser in cosmos db read. Azure cosmos uses jackson for the same. Need to introduce the custom serialiser here. But seems like using
attribute is not supported in micronaut ? ()
@JsonSerialize(using = CustomSerializer.class)
private CustomDTO customDto;