ec.gob.senescyt.sniese.commons.serializers.MensajeErrorSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sniese-commons Show documentation
Show all versions of sniese-commons Show documentation
Librería que contiene clases de uso comun para sniese hechos en dropwizard
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