Interface Serializer<T>


public interface Serializer<T>
Serializes a message to a single line of JSON.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    writeValue(Writer writer, T value)
    Serialize an object to single line of JSON and write it to the given writer.
  • Method Details

    • writeValue

      void writeValue(Writer writer, T value)
      Serialize an object to single line of JSON and write it to the given writer.
      • Values must be included unless their value is null or an "absent" reference values such as empty optionals.
      • Enums must be written as strings.
      • Implementations may not close the writer after writing a value.
      Parameters:
      writer - to write to
      value - to serialize