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

restx.jackson.JsonEntityRouteBuilder Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
package restx.jackson;

import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.ObjectWriter;
import restx.entity.StdEntityRoute;

import java.lang.reflect.Type;

public class JsonEntityRouteBuilder extends StdEntityRoute.Builder {
    public JsonEntityRouteBuilder withObjectWriter(Type type, ObjectWriter writer) {
        entityResponseWriter(JsonEntityResponseWriter.using(type, writer));
        return this;
    }

    public JsonEntityRouteBuilder withObjectReader(Type type, ObjectReader reader) {
        entityRequestBodyReader(JsonEntityRequestBodyReader.using(type, reader));
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy