Class JSONObjectWriter<T extends net.minidev.json.JSONAware>

java.lang.Object
com.nimbusds.common.appendable.JSONObjectWriter<T>
All Implemented Interfaces:
Appendable<T>, Serializable, Consumer<T>

@Deprecated public class JSONObjectWriter<T extends net.minidev.json.JSONAware> extends Object implements Consumer<T>, Appendable<T>
Deprecated.
JSON object writer for JAX-RS result streaming.

Use JSONObjectWriter.

See Also:
  • Constructor Details

    • JSONObjectWriter

      public JSONObjectWriter(Writer writer, KeyExtractor<T> keyExtractor)
      Deprecated.
      Creates a new JSON object writer.
      Parameters:
      writer - Writer for the JSON object. Must not be null.
      keyExtractor - Extracts or determines a JSON object key from the appended elements. Must not be null.
  • Method Details

    • writeStart

      public void writeStart()
      Deprecated.
      Writes out the opening '{' of the JSON object.
    • accept

      public void accept(T element)
      Deprecated.
      Specified by:
      accept in interface Consumer<T extends net.minidev.json.JSONAware>
    • append

      public void append(T element)
      Deprecated.
      Description copied from interface: Appendable
      Appends the specified element.
      Specified by:
      append in interface Appendable<T extends net.minidev.json.JSONAware>
      Parameters:
      element - The element to append. May be null.
    • writeEnd

      public void writeEnd()
      Deprecated.
      Writes out the closing '}' of the JSON object and closes the writer.