Consumer<T>
public class JSONArrayWriter<T extends net.minidev.json.JSONAware> extends Object implements Consumer<T>
Constructor | Description |
---|---|
JSONArrayWriter(Writer writer) |
Creates a new JSON array writer.
|
JSONArrayWriter(Writer writer,
boolean noDuplicates) |
Creates a new JSON array writer.
|
Modifier and Type | Method | Description |
---|---|---|
void |
accept(T element) |
|
void |
writeEnd() |
Writes out the closing ']' of the JSON array and closes the writer.
|
void |
writeStart() |
Writes out the opening '[' of the JSON array.
|
public JSONArrayWriter(Writer writer)
writer
- Writer for the JSON array. Must not be null
.public JSONArrayWriter(Writer writer, boolean noDuplicates)
writer
- Writer for the JSON array. Must not be
null
.noDuplicates
- true
to ensure no duplicates are written
to the JSON array.public void writeStart()
public void writeEnd()
Copyright © 2018 Connect2id. All rights reserved.