Interface JsonMarshaller


public interface JsonMarshaller
Interface that must be implemented by all JSON marshallers. This instance is not reused unless JsonMarshallerFactory.getJsonMarshaller() returns the same instance multiple times.
  • Method Summary

    Modifier and Type Method Description
    <T> T fromJson​(Type type, InputStream in)
    Convert the JSON stream to the given type.
    void toJson​(Object object, OutputStream out)
    Convert the given object to JSON on the stream.
  • Method Details

    • toJson

      void toJson​(Object object, OutputStream out)
      Convert the given object to JSON on the stream. The output stream is closed by this marshaller
    • fromJson

      <T> T fromJson​(Type type, InputStream in)
      Convert the JSON stream to the given type. The input stream is closed by this marshaller