Package io.avaje.jex.core
Class JacksonJsonService
- java.lang.Object
-
- io.avaje.jex.core.JacksonJsonService
-
- All Implemented Interfaces:
JsonService
public class JacksonJsonService extends Object implements JsonService
-
-
Constructor Summary
Constructors Constructor Description JacksonJsonService()JacksonJsonService(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TjsonRead(Class<T> clazz, SpiContext ctx)Read the request body as a bean and return the bean.voidjsonWrite(Object bean, SpiContext ctx)Write the bean as JSON response content.
-
-
-
Method Detail
-
jsonRead
public <T> T jsonRead(Class<T> clazz, SpiContext ctx)
Description copied from interface:JsonServiceRead the request body as a bean and return the bean.- Specified by:
jsonReadin interfaceJsonService
-
jsonWrite
public void jsonWrite(Object bean, SpiContext ctx)
Description copied from interface:JsonServiceWrite the bean as JSON response content.- Specified by:
jsonWritein interfaceJsonService
-
-