mx.emite.sdk.serializers.EstadosSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ef-sdk-java Show documentation
Show all versions of ef-sdk-java Show documentation
Este kit de consumo provee a los integradores de Apis de Java para construir software que consuma los diferentes servicios web publicados por Emite Facturacion
The newest version!
package mx.emite.sdk.serializers;
import java.io.IOException;
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 mx.emite.sdk.enums.sat.Estados;
public class EstadosSerializer extends JsonSerializer{
@Override
public void serialize(Estados estado, JsonGenerator gen, SerializerProvider provider) throws IOException, JsonProcessingException {
if(estado==null||estado.getIdSat()==null)
gen.writeNull();
else
gen.writeString(estado.getIdSat());
}
}