T - Type of result being composed.public class JSONComposer<T> extends SequenceComposer<JSONComposer<T>>
JsonGenerator object.
This is similar to ArrayComposer, but does not
have parent composer (so no end() method),
but does implement Closeable| Modifier and Type | Field and Description |
|---|---|
protected com.fasterxml.jackson.core.util.ByteArrayBuilder |
_byteWriter |
protected boolean |
_closeGenerator |
protected int |
_features |
protected T |
_result |
protected com.fasterxml.jackson.core.io.SegmentedStringWriter |
_stringWriter |
_generator_child, _open| Modifier | Constructor and Description |
|---|---|
|
JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
boolean closeGenerator) |
protected |
JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.util.ByteArrayBuilder w) |
protected |
JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.io.SegmentedStringWriter w) |
protected |
JSONComposer(int features,
T result) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
_finish() |
protected JSONComposer<T> |
_start() |
static JSONComposer<byte[]> |
bytesComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.util.ByteArrayBuilder w) |
static <T extends Collection<Object>> |
collectionComposer(int features,
T coll) |
T |
finish()
Method to call to complete composition, flush any pending content,
and return instance of specified result type.
|
static JSONComposer<Map<String,Object>> |
mapComposer(int features,
Map<String,Object> map) |
static <RESULT> JSONComposer<RESULT> |
streamComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
boolean closeGenerator) |
static JSONComposer<String> |
stringComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.io.SegmentedStringWriter w) |
_closeChild, _this, add, add, add, add, add, add, addNull, addObject, flush, startArray, startObject_childClosed, _illegalCall, _safeFinish, _startArray, _startCollection, _startMap, _startObjectprotected final int _features
protected final boolean _closeGenerator
protected T _result
protected com.fasterxml.jackson.core.io.SegmentedStringWriter _stringWriter
protected com.fasterxml.jackson.core.util.ByteArrayBuilder _byteWriter
public JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
boolean closeGenerator)
protected JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.io.SegmentedStringWriter w)
protected JSONComposer(int features,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.core.util.ByteArrayBuilder w)
protected JSONComposer(int features,
T result)
public static <RESULT> JSONComposer<RESULT> streamComposer(int features, com.fasterxml.jackson.core.JsonGenerator gen, boolean closeGenerator)
public static JSONComposer<String> stringComposer(int features, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.core.io.SegmentedStringWriter w)
public static JSONComposer<byte[]> bytesComposer(int features, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.core.util.ByteArrayBuilder w)
public static <T extends Collection<Object>> JSONComposer<T> collectionComposer(int features, T coll)
public static JSONComposer<Map<String,Object>> mapComposer(int features, Map<String,Object> map)
public T finish() throws IOException
IOExceptionprotected JSONComposer<T> _start() throws IOException
_start in class ComposerBaseIOExceptionprotected Object _finish() throws IOException
_finish in class ComposerBaseIOExceptionCopyright © 2022 FasterXML. All rights reserved.