| Modifier and Type | Field and Description |
|---|---|
| protected JsonGenerator | delegate
Delegate object that method calls are delegated to. |
| protected boolean | delegateCopyMethods
Whether copy methods
( |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JsonGeneratorDelegate(JsonGenerator
Underlying generator to delegate calls to d, boolean Flag assigned to delegateCopyMethods)delagateCopyMethod
and which defines whether copy methods are handled locally (false), or
delegated to configured
|
| Modifier and Type | Method and Description |
|---|---|
| public void | assignCurrentValue(Object
Current value to assign for the current context of this generator v)Overrides com.
getOutputContext().setCurrentValue(v);
|
| public boolean | canOmitFields()
Overrides com. |
| public boolean | canUseSchema(FormatSchema
Schema to check schema)Overrides com. setSchema).
|
| public boolean | canWriteBinaryNatively()
Overrides com. |
| public boolean | canWriteFormattedNumbers()
Overrides com. writeNumber(java.
using possible custom format, or not.
|
| public boolean | canWriteObjectId()
Overrides com. |
| public boolean | canWriteTypeId()
Overrides com. |
| public void | close()
Implements abstract com. Implements java. |
| public void | copyCurrentEvent(JsonParser
Parser that points to event (token) to copy p)Overrides com. |
| public void | copyCurrentStructure(JsonParser
Parser that points to the value to copy p)Overrides com. |
| public Object | currentValue()
Overrides com.
getOutputContext().getCurrentValue();
Note that "current value" is NOT populated (or used) by Streaming parser or generators; it is only used by higher-level data-binding functionality. |
| public JsonGenerator | |
| public JsonGenerator | disable(JsonGenerator.
Feature to disable fImplements abstract com. Feature for list of features)
|
| public JsonGenerator | enable(JsonGenerator.
Feature to enable fImplements abstract com. Feature for list of available features.
|
| public void | flush()
Implements abstract com. Implements java. |
| public CharacterEscapes | getCharacterEscapes()
Overrides com. JsonGenerators
it creates.
|
| public ObjectCodec | getCodec()
Implements abstract com. writeObject).
|
| public Object | getCurrentValue()
Overrides com. currentValue(), to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| public JsonGenerator | |
| public int | getFeatureMask()
Implements abstract com. JsonGenerator.s.
|
| public int | getHighestEscapedChar()
Overrides com. |
| public int | getOutputBuffered()
Overrides com. |
| public JsonStreamContext | getOutputContext()
Implements abstract com. |
| public Object | getOutputTarget()
Overrides com. OutputStream or Writer, depending on what
generator was constructed with.
|
| public PrettyPrinter | getPrettyPrinter()
Overrides com. PrettyPrinter; returns it if so, null if none configured.
|
| public FormatSchema | getSchema()
Overrides com. null if none.
|
| public JacksonFeatureSet | getWriteCapabilities()
Overrides com. |
| public boolean | isClosed()
Implements abstract com. |
| public boolean | isEnabled(JsonGenerator.
Feature to check fImplements abstract com. |
| public JsonGenerator | overrideFormatFeatures(int
Bit mask of set/clear state for features to change values, int Bit mask of features to change mask)Overrides com. FormatFeatures,
by specifying values (set / clear) along with a mask, to determine
which features to change, if any.
|
| public JsonGenerator | overrideStdFeatures(int
Bit mask of set/clear state for features to change values, int Bit mask of features to change mask)Overrides com. mask.
|
| public JsonGenerator | setCharacterEscapes(CharacterEscapes
CharacterEscapes to configure this generator to use, if any; null if noneOverrides com. JsonGenerators
it creates.
|
| public JsonGenerator | setCodec(ObjectCodec
Codec to assign, if any; oc)null if noneImplements abstract com. writeObject).
|
| public void | setCurrentValue(Object
Current value to assign for the current context of this generator v)Overrides com. assignCurrentValue, to be deprecated in later
Jackson 2.x versions (and removed from Jackson 3.0).
|
| public JsonGenerator | setFeatureMask(int
Bitmask that defines which mask)Features are enabled
and which disabledImplements abstract com.
Deprecated
Bulk set method for (re)setting states of all standard Features
|
| public JsonGenerator | setHighestNonEscapedChar(int
Either -1 to indicate that no additional escaping
is to be done; or highest code point not to escape (meaning higher
ones will be), if positive value. charCode)Overrides com. |
| public JsonGenerator | setPrettyPrinter(PrettyPrinter
PrettyPrinter to assign, if any; null if noneOverrides com. |
| public JsonGenerator | setRootValueSeparator(SerializableString
Separator to use, if any; null means that no separator is
automatically added sep)Overrides com.
Default implementation throws |
| public void | setSchema(FormatSchema
Schema to use schema)Overrides com. |
| public StreamWriteConstraints | streamWriteConstraints()
Overrides com. |
| public JsonGenerator | useDefaultPrettyPrinter()
Implements abstract com. com.).
|
| public Version | version()
Implements abstract com. Implements com. |
| public void | writeArray(int[]
Array that contains values to write array, int Offset of the first element to write, within array offset, int Number of elements in array to write, from `offset` to `offset + len - 1` length)Overrides com. JsonToken#START_ARRAY, zero or
more JsonToken#VALUE_NUMBER_INT, JsonToken#END_ARRAY)
|
| public void | writeArray(long[]
Array that contains values to write array, int Offset of the first element to write, within array offset, int Number of elements in array to write, from `offset` to `offset + len - 1` length)Overrides com. JsonToken#START_ARRAY, zero or
more JsonToken#VALUE_NUMBER_INT, JsonToken#END_ARRAY)
|
| public void | writeArray(double[]
Array that contains values to write array, int Offset of the first element to write, within array offset, int Number of elements in array to write, from `offset` to `offset + len - 1` length)Overrides com. JsonToken#START_ARRAY, zero or
more JsonToken#VALUE_NUMBER_FLOAT, JsonToken#END_ARRAY)
|
| public void | writeArray(String[]
Array that contains values to write array, int Offset of the first element to write, within array offset, int Number of elements in array to write, from `offset` to `offset + len - 1` length)Overrides com. JsonToken#START_ARRAY, zero or
more JsonToken#VALUE_STRING, JsonToken#END_ARRAY)
|
| public void | writeBinary(Base64Variant
Base64 variant to use: defines details such as
whether padding is used (and if so, using which character);
what is the maximum line length before adding linefeed,
and also the underlying alphabet to use. b64variant, byte[] Buffer that contains binary data to write data, int Offset in offset, int data of the first byte of data to writeLength of data to write len)Implements abstract com. |
| public int | writeBinary(Base64Variant
Base64 variant to use b64variant, InputStream InputStream to use for reading binary data to write.
Will not be closed after successful write operation data, int (optional) number of bytes that will be available;
or -1 to be indicate it is not known.
If a positive length is given, dataLength)data MUST provide at least
that many bytes: if not, an exception will be thrown.
Note that implementations
need not support cases where length is not known in advance; this
depends on underlying data format: JSON output does NOT require length,
other formats may.Implements abstract com. writeBinary(Base64Variant, byte[], int, int),
but where input is provided through a stream, allowing for incremental
writes without holding the whole input in memory.
|
| public void | writeBoolean(boolean
Boolean value to write state)Implements abstract com. |
| public void | writeEmbeddedObject(Object
Native format-specific value to write object)Overrides com. |
| public void | writeEndArray()
Implements abstract com. |
| public void | writeEndObject()
Implements abstract com. |
| public void | writeFieldId(long
Field id to write id)Overrides com. writeFieldName(String) that may be used
in cases where property key is of numeric type; either where
underlying format supports such notion (some binary formats do,
unlike JSON), or for convenient conversion into String presentation.
|
| public void | writeFieldName(String
Field name to write name)Implements abstract com. |
| public void | writeFieldName(SerializableString
Field name to write name)Implements abstract com. writeFieldName(String), main difference
being that it may perform better as some of processing (such as
quoting of certain characters, or encoding into external encoding
if supported by generator) can be done just once and reused for
later calls.
|
| public void | writeNull()
Implements abstract com. |
| public void | writeNumber(short
Number value to write v)Overrides com. |
| public void | writeNumber(int
Number value to write v)Implements abstract com. |
| public void | writeNumber(long
Number value to write v)Implements abstract com. |
| public void | writeNumber(BigInteger
Number value to write v)Implements abstract com. |
| public void | writeNumber(double
Number value to write v)Implements abstract com. |
| public void | writeNumber(float
Number value to write v)Implements abstract com. |
| public void | writeNumber(BigDecimal
Number value to write v)Implements abstract com. |
| public void | writeNumber(String
Textual (possibly format) number representation to write encodedValue)Implements abstract com. |
| public void | writeNumber(char[]
Buffer that contains the textual number representation to write encodedValueBuffer, int Offset of the first character of value to write offset, int Length of the value (in characters) to write length)Overrides com. writeNumber(String) with same semantics
but possibly more efficient operation.
|
| public void | writeObject(Object
Java value (usually POJO) to write pojo)Implements abstract com. writePOJO(Object)
|
| public void | writeObjectId(Object
Native Object Id to write id)Overrides com. canWriteObjectId()), as not all data formats
have native type id support; and some may only allow them in
certain positions or locations.
|
| public void | writeObjectRef(Object
Referenced value, for which Object Id is expected to be written id)Overrides com. |
| public void | writeOmittedField(String
Name of the field omitted fieldName)Overrides com. |
| public void | writePOJO(Object
Java value (usually POJO) to write pojo)Overrides com. |
| public void | writeRaw(String
Textual contents to include as-is in output. text)Implements abstract com. |
| public void | writeRaw(String
String that has contents to include as-is in output text, int Offset within offset, int text of the first character to outputLength of content (from len)text, starting at offset offset) to outputImplements abstract com. |
| public void | writeRaw(SerializableString
Pre-encoded textual contents to included in output raw)Overrides com. |
| public void | writeRaw(char[]
Buffer that has contents to include as-is in output text, int Offset within offset, int text of the first character to outputLength of content (from len)text, starting at offset offset) to outputImplements abstract com. |
| public void | writeRaw(char
Character to included in output c)Implements abstract com. |
| public void | writeRawUTF8String(byte[]
Buffer that contains String value to write text, int Offset in offset, int buffer of the first byte of String value to writeLength of the String value (in characters) to write length)Implements abstract com. writeString(String) but that takes as
its input a UTF-8 encoded String that is to be output as-is, without additional
escaping (type of which depends on data format; backslashes for JSON).
|
| public void | writeRawValue(String
Textual contents to included in output text)Implements abstract com. |
| public void | writeRawValue(String text, int offset, int len)
Implements abstract com. |
| public void | writeRawValue(char[] text, int offset, int len)
Implements abstract com. |
| public void | writeStartArray()
Implements abstract com. |
| public void | writeStartArray(int
Number of elements this array will have: actual
number of values written (before matching call to
size)writeEndArray() MUST match; generator MAY verify
this is the case (and SHOULD if format itself encodes length)Overrides com. writeStartArray(),
but also specifying how many
elements will be written for the array before calling
writeEndArray().
|
| public void | writeStartArray(Object
"Current value" to assign for the Array context being created forValue)Overrides com. writeStartArray(),
but also specifying the "current value"
to assign to the new Array context being created.
|
| public void | writeStartArray(Object
"Current value" to assign for the Array context being created forValue, int Number of elements this Array will have: actual
number of values written (before matching call to
size)writeEndArray() MUST match; generator MAY verify
this is the case (and SHOULD if format itself encodes length)Overrides com. writeStartArray(), but also specifying the "current value"
to assign to the new Array context being created
as well as how many elements will be written for the array before calling
writeEndArray().
|
| public void | writeStartObject()
Implements abstract com. |
| public void | writeStartObject(Object
"Current value" to assign for the Object context being created forValue)Overrides com. |
| public void | writeStartObject(Object
"Current value" to assign for the Object context being created forValue, int Number of key/value pairs this Object will have: actual
number of entries written (before matching call to
size)writeEndObject() MUST match; generator MAY verify
this is the case (and SHOULD if format itself encodes length)Overrides com. |
| public void | writeString(String
Text value to write text)Implements abstract com. |
| public void | writeString(Reader
Reader to use for reading Text value to write reader, int Maximum Length of Text value to read (in len)chars, non-negative)
if known; -1 to indicate "read and write it all"Overrides com. |
| public void | writeString(char[]
Buffer that contains String value to write text, int Offset in offset, int buffer of the first character of String value to writeLength of the String value (in characters) to write len)Implements abstract com. |
| public void | writeString(SerializableString
Pre-encoded String value to write text)Implements abstract com. writeString(String), but that takes
SerializableString which can make this potentially
more efficient to call as generator may be able to reuse
quoted and/or encoded representation.
|
| public void | writeTree(TreeNode
TreeNode to writeImplements abstract com. |
| public void | writeTypeId(Object
Native Type Id to write id)Overrides com. canWriteTypeId()), as not all data formats
have native type id support; and some may only allow them in
certain positions or locations.
|
| public void | writeUTF8String(byte[]
Buffer that contains String value to write text, int Offset in offset, int buffer of the first byte of String value to writeLength of the String value (in characters) to write length)Implements abstract com. writeString(String) but that takes as its input
a UTF-8 encoded String which has not been escaped using whatever
escaping scheme data format requires (for JSON that is backslash-escaping
for control characters and double-quotes; for other formats something else).
|