Class JacksonRepresentation

java.lang.Object
is.galia.resource.JacksonRepresentation
All Implemented Interfaces:
Representation

public class JacksonRepresentation extends Object implements Representation
Representation for serializing objects to JSON strings.
  • Constructor Details

    • JacksonRepresentation

      public JacksonRepresentation(Object toWrite)
  • Method Details

    • write

      public void write(OutputStream outputStream) throws IOException
      Description copied from interface: Representation
      Writes some kind of data (image data, HTML, JSON, etc.) to the given response stream for transmission to the client.
      Specified by:
      write in interface Representation
      Parameters:
      outputStream - Stream to write to, which should not be closed.
      Throws:
      IOException
    • write

      public void write(OutputStream outputStream, Map<com.fasterxml.jackson.databind.SerializationFeature,Boolean> serializationFeatures) throws IOException
      Throws:
      IOException