Package com.nimbusds.common.appendable
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JSONObjectWriter(Writer writer, KeyExtractor<T> keyExtractor)
Deprecated.Creates a new JSON object writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(T element)
Deprecated.void
append(T element)
Deprecated.Appends the specified element.void
writeEnd()
Deprecated.Writes out the closing '}' of the JSON object and closes the writer.void
writeStart()
Deprecated.Writes out the opening '{' of the JSON object.
-
-
-
Constructor Detail
-
JSONObjectWriter
public JSONObjectWriter(Writer writer, KeyExtractor<T> keyExtractor)
Deprecated.Creates a new JSON object writer.- Parameters:
writer
- Writer for the JSON object. Must not benull
.keyExtractor
- Extracts or determines a JSON object key from the appended elements. Must not benull
.
-
-
Method Detail
-
writeStart
public void writeStart()
Deprecated.Writes out the opening '{' of the JSON object.
-
append
public void append(T element)
Deprecated.Description copied from interface:Appendable
Appends the specified element.- Specified by:
append
in interfaceAppendable<T extends net.minidev.json.JSONAware>
- Parameters:
element
- The element to append. May benull
.
-
writeEnd
public void writeEnd()
Deprecated.Writes out the closing '}' of the JSON object and closes the writer.
-
-