Package com.nimbusds.common.json
Class JSONObjectWriter<T extends net.minidev.json.JSONAware>
java.lang.Object
com.nimbusds.common.json.JSONObjectWriter<T>
- All Implemented Interfaces:
Consumer<T>
public class JSONObjectWriter<T extends net.minidev.json.JSONAware>
extends Object
implements Consumer<T>
JSON object writer for JAX-RS result streaming.
-
Constructor Summary
ConstructorDescriptionJSONObjectWriter
(Writer writer, KeyExtractor<T> keyExtractor) Creates a new JSON object writer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
writeEnd()
Writes out the closing '}' of the JSON object and closes the writer.void
Writes out the opening '{' of the JSON object.
-
Constructor Details
-
JSONObjectWriter
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 Details