Module io.avaje.jex

Interface JsonService

All Known Implementing Classes:
JacksonJsonService, JsonbJsonService

public interface JsonService
Service used to convert request/response bodies to beans.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    jsonRead(Class<T> type, SpiContext ctx)
    Read the request body as a bean and return the bean.
    void
    Write the bean as JSON response content.
    <E> void
    Write the beans as x-json-stream JSON with new line delimiter.
  • Method Details

    • jsonRead

      <T> T jsonRead(Class<T> type, SpiContext ctx)
      Read the request body as a bean and return the bean.
    • jsonWrite

      void jsonWrite(Object bean, SpiContext ctx)
      Write the bean as JSON response content.
    • jsonWriteStream

      <E> void jsonWriteStream(Iterator<E> stream, SpiContext ctx)
      Write the beans as x-json-stream JSON with new line delimiter.