@Deprecated public class JSONObjectWriter<T extends net.minidev.json.JSONAware> extends Object implements Consumer<T>, Appendable<T>
Use JSONObjectWriter
.
Constructor and Description |
---|
JSONObjectWriter(Writer writer,
KeyExtractor<T> keyExtractor)
Deprecated.
Creates a new JSON object writer.
|
Modifier and Type | Method and 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.
|
public JSONObjectWriter(Writer writer, KeyExtractor<T> keyExtractor)
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
.public void writeStart()
public void append(T element)
Appendable
append
in interface Appendable<T extends net.minidev.json.JSONAware>
element
- The element to append. May be null
.public void writeEnd()
Copyright © 2019 Connect2id. All rights reserved.