I have a property like this:
@CatalogExportField(columnName = "K", headerName = "catalog name")
private Boolean mpAvailable;
I need to get this as string while parsing in other class
private CatalogExportDto convert(Variant variant, boolean willHaveProductTypeFields) {
CatalogExportDto dto = new CatalogExportDto()
.setMpAvailable(variant.isMpAvailable())
But here it is boolean.
I need to do somethng like this i think.
@JsonDeserialize(using = BooleanDeserializer.class)
@JsonProperty("Timestamp")
ZonedDateTime timestamp;
@CatalogExportField(columnName = "K", headerName = "catalog nae")
private Boolean mpAvailable;
And another class like this
public class BooleanDeserializer {
@Override
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
but could not find any proper example.
this is also
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface CatalogExportField {
String color() default "#56aaff";
String columnName() default "";
String headerName() default "";
String displayName() default "";
}