
com.makeandbuild.vessl.rest.serializers.ObjectNotFoundExceptionSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vessl Show documentation
Show all versions of vessl Show documentation
a lightweight persistence, REST, fixture, property configuration, and validation framework
package com.makeandbuild.vessl.rest.serializers;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.makeandbuild.vessl.persistence.ObjectNotFoundException;
public class ObjectNotFoundExceptionSerializer extends BaseSerializer {
@Override
public void serialize(ObjectNotFoundException value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
jgen.writeStartObject();
writeObjectField(jgen, "message", value.getMessage());
writeObjectField(jgen, "localizedMessage", value.getLocalizedMessage());
writeObjectField(jgen, "class", value.getClass().getName());
jgen.writeEndObject();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy