java.lang.Object
io.avaje.jex.core.JacksonJsonService
- All Implemented Interfaces:
JsonService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<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.<T> voidjsonWriteStream(Iterator<T> iterator, SpiContext ctx) Write the beans as x-json-stream JSON with new line delimiter.
-
Constructor Details
-
JacksonJsonService
public JacksonJsonService() -
JacksonJsonService
public JacksonJsonService(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
jsonRead
Description copied from interface:JsonServiceRead the request body as a bean and return the bean.- Specified by:
jsonReadin interfaceJsonService
-
jsonWrite
Description copied from interface:JsonServiceWrite the bean as JSON response content.- Specified by:
jsonWritein interfaceJsonService
-
jsonWriteStream
Description copied from interface:JsonServiceWrite the beans as x-json-stream JSON with new line delimiter.- Specified by:
jsonWriteStreamin interfaceJsonService
-