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 Detail

      • 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