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

ec.gob.senescyt.sniese.commons.serializers.MensajeErrorSerializer Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package ec.gob.senescyt.sniese.commons.serializers;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import ec.gob.senescyt.sniese.commons.core.MensajeError;

import java.io.IOException;

public class MensajeErrorSerializer extends JsonSerializer {
    @Override
    public void serialize(MensajeError mensajeError, JsonGenerator jgen, SerializerProvider provider) throws
            IOException, JsonProcessingException {
        jgen.writeObject(mensajeError.getAtributo() + " " + mensajeError.getMensaje() + " (was [])");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy