JsonNode values directly
as part of serialization.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| pack-priv abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final JsonNodeFactory | |
| protected final ObjectWriteContext | |
| protected TreeBuildingGenerator. | |
| protected final int | _streamWriteFeatures
Bit flag composed of bits that indicate which
|
| protected TreeBuildingGenerator. | |
| protected static final JacksonFeatureSet | |
| protected static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | assignCurrentValue(Object v)
Implements abstract tools. Helper method, usually equivalent to:
|
| public boolean | canWriteObjectId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Object Ids natively (many do not; for example, JSON doesn't). |
| public boolean | canWriteTypeId()
Overrides tools. Introspection method that may be called to see if the underlying data format supports some kind of Type Ids natively (many do not; for example, JSON doesn't). |
| public void | close()
Implements abstract tools. Implements java. Method called to close this generator, so that no more content can be written. |
| public JsonGenerator | configure(StreamWriteFeature f, boolean state)
Implements abstract tools. Method for enabling or disabling specified feature:
check |
| public Object | currentValue()
Implements abstract tools. Helper method, usually equivalent to:
Note that "current value" is NOT populated (or used) by Streaming generator; it is only used by higher-level data-binding functionality. |
| public void | flush()
Implements abstract tools. Implements java. Method called to flush any buffered content to the underlying target (output stream, writer), and to flush the target itself as well. |
| public static TreeBuildingGenerator | |
| public CharacterEscapes | getCharacterEscapes()
Overrides tools. Method for accessing custom escapes generator uses for |
| public int | getHighestNonEscapedChar()
Overrides tools. Accessor method for testing what is the highest unescaped character configured for this generator. |
| public PrettyPrinter | getPrettyPrinter()
Overrides tools. Accessor for object that handles pretty-printing (usually additional white space to make results more human-readable) during output. |
| public FormatSchema | getSchema()
Overrides tools. Method for accessing Schema that this generator uses, if any. |
| public boolean | has(StreamWriteCapability capability)
Implements abstract tools. Accessor for checking whether this generator has specified capability. |
| public boolean | isClosed()
Implements abstract tools. Method that can be called to determine whether this generator is closed or not. |
| public boolean | isEnabled(StreamWriteFeature f)
Implements abstract tools. Method for checking whether given feature is enabled. |
| public ObjectWriteContext | objectWriteContext()
Implements abstract tools. Accessor for context object provided by higher-level databinding functionality (or, in some cases, simple placeholder of the same) that allows some level of interaction including ability to trigger serialization of Object values through generator instance. |
| public JacksonFeatureSet | streamWriteCapabilities()
Implements abstract tools. Accessor for getting metadata on capabilities of this generator, based on underlying data format being read (directly or indirectly). |
| public TokenStreamContext | streamWriteContext()
Implements abstract tools. Accessor for context object that provides information about low-level logical position withing output token stream. |
| public int | streamWriteFeatures()
Implements abstract tools. Bulk access method for getting state of all standard (format-agnostic)
|
| public int | streamWriteOutputBuffered()
Implements abstract tools. Method for verifying amount of content that is buffered by generator but not yet flushed to the underlying target (stream, writer), in units (byte, char) that the generator implementation uses for buffering; or -1 if this information is not available. |
| public Object | streamWriteOutputTarget()
Implements abstract tools. Method that can be used to get access to object that is used
as target for generated output; this is usually either
|
| public JsonNode | |
| public Version | version()
Implements abstract tools. Implements tools. Accessor for finding out version of the bundle that provided this generator instance. |
| public JsonGenerator | writeBinary(Base64Variant b64variant, byte[] data, int offset, int len)
Implements abstract tools. Method that will output given chunk of binary data as base64 encoded, as a complete String value (surrounded by double quotes). |
| public int | writeBinary(Base64Variant b64variant, InputStream data, int dataLength)
Implements abstract tools. Although we could support this method, it does not necessarily make sense: we cannot make good use of streaming because buffer must hold all the data. |
| public JsonGenerator | writeBoolean(boolean state)
Implements abstract tools. Method for outputting literal JSON boolean value (one of Strings 'true' and 'false'). |
| public JsonGenerator | writeEmbeddedObject(Object object)
Overrides tools. Method that can be called on backends that support passing opaque native values that some data formats support; not used with JSON backend, more common with binary formats. |
| public JsonGenerator | writeEndArray()
Implements abstract tools. Method for writing closing marker of a JSON Array value (character ']'; plus possible white space decoration if pretty-printing is enabled). |
| public JsonGenerator | writeEndObject()
Implements abstract tools. Method for writing closing marker of an Object value (character '}'; plus possible white space decoration if pretty-printing is enabled). |
| public JsonGenerator | writeName(String name)
Implements abstract tools. Method for writing an Object Property name (JSON String surrounded by double quotes: syntactically identical to a JSON String value), possibly decorated by white space if pretty-printing is enabled. |
| public JsonGenerator | writeName(SerializableString name)
Implements abstract tools. Method similar to |
| public JsonGenerator | writeNull()
Implements abstract tools. Method for outputting literal JSON null value. |
| public JsonGenerator | writeNumber(short v)
Implements abstract tools. Method for outputting given value as JSON number. |
| public JsonGenerator | writeNumber(int v)
Implements abstract tools. Method for outputting given value as JSON number. |
| public JsonGenerator | writeNumber(long v)
Implements abstract tools. Method for outputting given value as JSON number. |
| public JsonGenerator | writeNumber(double v)
Implements abstract tools. Method for outputting indicate JSON numeric value. |
| public JsonGenerator | writeNumber(float v)
Implements abstract tools. Method for outputting indicate JSON numeric value. |
| public JsonGenerator | writeNumber(BigDecimal v)
Implements abstract tools. Method for outputting indicate JSON numeric value. |
| public JsonGenerator | writeNumber(BigInteger v)
Implements abstract tools. Method for outputting given value as JSON number. |
| public JsonGenerator | writeNumber(String encodedValue)
Implements abstract tools. Write method that can be used for custom numeric types that can not be (easily?) converted to "standard" Java number types. |
| public JsonGenerator | writeObjectId(Object id)
Overrides tools. Method that can be called to output so-called native Object Id.
Note that it may only be called after ensuring this is legal
(with |
| public JsonGenerator | writePOJO(Object value)
Implements abstract tools. Method for writing given Java object (POJO) as tokens into stream this generator manages; serialization must be a valid JSON Value (Object, Array, null, Number, String or Boolean). |
| public JsonGenerator | writePropertyId(long id)
Implements abstract tools. Alternative to |
| public JsonGenerator | writeRaw(String text)
Implements abstract tools. Method that will force generator to copy input text verbatim with no modifications (including that no escaping is done and no separators are added even if context [array, object] would otherwise require such). |
| public JsonGenerator | writeRaw(String text, int offset, int len)
Implements abstract tools. Method that will force generator to copy input text verbatim with no modifications (including that no escaping is done and no separators are added even if context [array, object] would otherwise require such). |
| public JsonGenerator | writeRaw(SerializableString text)
Overrides tools. Method that will force generator to copy input text verbatim with no modifications (including that no escaping is done and no separators are added even if context [array, object] would otherwise require such). |
| public JsonGenerator | writeRaw(char[] text, int offset, int len)
Implements abstract tools. Method that will force generator to copy input text verbatim with no modifications (including that no escaping is done and no separators are added even if context [array, object] would otherwise require such). |
| public JsonGenerator | writeRaw(char c)
Implements abstract tools. Method that will force generator to copy input text verbatim with no modifications (including that no escaping is done and no separators are added even if context [array, object] would otherwise require such). |
| public JsonGenerator | writeRawUTF8String(byte[] text, int offset, int length)
Implements abstract tools. Method similar to |
| public JsonGenerator | writeRawValue(String text)
Implements abstract tools. Method that will force generator to copy input text verbatim without any modifications, but assuming it must constitute a single legal JSON value (number, string, boolean, null, Array or List). |
| public JsonGenerator | writeRawValue(String text, int offset, int len)
Implements abstract tools.
|
| public JsonGenerator | writeRawValue(char[] text, int offset, int len)
Implements abstract tools.
|
| public JsonGenerator | writeStartArray()
Implements abstract tools. Method for writing starting marker of a Array value (for JSON this is character '['; plus possible white space decoration if pretty-printing is enabled). |
| public JsonGenerator | writeStartArray(Object forValue)
Implements abstract tools. Method for writing start marker of an Array value, similar
to |
| public JsonGenerator | writeStartArray(Object forValue, int len)
Implements abstract tools. Method for writing start marker of an Array value, similar
to |
| public JsonGenerator | writeStartObject()
Implements abstract tools. Method for writing starting marker of an Object value (character '{'; plus possible white space decoration if pretty-printing is enabled). |
| public JsonGenerator | writeStartObject(Object forValue)
Implements abstract tools. Method for writing starting marker of an Object value to represent the given Java Object value. |
| public JsonGenerator | writeStartObject(Object forValue, int size)
Implements abstract tools. Method for writing starting marker of an Object value to represent the given Java Object value. |
| public JsonGenerator | writeString(String text)
Implements abstract tools. Method for outputting a String value. |
| public JsonGenerator | writeString(char[] text, int offset, int len)
Implements abstract tools. Method for outputting a String value. |
| public JsonGenerator | writeString(SerializableString text)
Implements abstract tools. Method similar to |
| public JsonGenerator | writeString(Reader reader, int len)
Implements abstract tools. Method for outputting a String value. |
| public JsonGenerator | writeTree(TreeNode node)
Implements abstract tools. Method for writing given JSON tree (expressed as a tree
where given |
| public JsonGenerator | writeTypeId(Object id)
Overrides tools. Method that can be called to output so-called native Type Id.
Note that it may only be called after ensuring this is legal
(with |
| public JsonGenerator | writeUTF8String(byte[] text, int offset, int length)
Implements abstract tools. Method similar to |