All Downloads are FREE. Search and download functionalities are using the official Maven repository.

website.automate.waml.io.serializer.WamlSerializerModifier Maven / Gradle / Ivy

The newest version!
package website.automate.waml.io.serializer;

import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializationConfig;
import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
import website.automate.waml.io.model.main.criteria.Criteria;

public class WamlSerializerModifier extends BeanSerializerModifier {

    @Override
    public JsonSerializer modifySerializer(SerializationConfig config, BeanDescription beanDesc,
            JsonSerializer serializer) {
        if (Criteria.class.isAssignableFrom(beanDesc.getBeanClass())) {
            return new CriteriaSerializer(serializer);
        }
        return serializer;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy