public abstract class JsonGeneratorImpl extends GeneratorBase
UTF8JsonGenerator and WriterBasedJsonGenerator.JsonGenerator.FeatureSURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST| Constructor and Description |
|---|
JsonGeneratorImpl(IOContext ctxt,
int features,
ObjectCodec codec) |
| Modifier and Type | Method and Description |
|---|---|
JsonGenerator |
disable(JsonGenerator.Feature f)
Method for disabling specified feature
(check
JsonGenerator.Feature for list of features) |
JsonGenerator |
enable(JsonGenerator.Feature f)
Method for enabling specified generator feature:
check
JsonGenerator.Feature for list of available features. |
CharacterEscapes |
getCharacterEscapes()
Method for accessing custom escapes factory uses for
JsonGenerators
it creates. |
int |
getHighestEscapedChar()
Accessor method for testing what is the highest unescaped character
configured for this generator.
|
JacksonFeatureSet<StreamWriteCapability> |
getWriteCapabilities()
Accessor for getting metadata on capabilities of this generator, based on
underlying data format being read (directly or indirectly).
|
JsonGenerator |
setCharacterEscapes(CharacterEscapes esc)
Method for defining custom escapes factory uses for
JsonGenerators
it creates. |
JsonGenerator |
setHighestNonEscapedChar(int charCode)
Method that can be called to request that generator escapes
all character codes above specified code point (if positive value);
or, to not escape any characters except for ones that must be
escaped for the data format (if -1).
|
JsonGenerator |
setRootValueSeparator(SerializableString sep)
Method that allows overriding String used for separating root-level
JSON values (default is single space character)
|
Version |
version()
Implemented with standard version number detection algorithm, typically using
a simple generated class, with information extracted from Maven project file
during build.
|
close, flush, getCodec, getCurrentValue, getFeatureMask, getOutputContext, isClosed, isEnabled, overrideStdFeatures, setCodec, setCurrentValue, setFeatureMask, useDefaultPrettyPrinter, writeBinary, writeFieldName, writeObject, writeRawValue, writeRawValue, writeRawValue, writeRawValue, writeStartObject, writeString, writeTreeassignCurrentValue, canOmitFields, canUseSchema, canWriteBinaryNatively, canWriteFormattedNumbers, canWriteObjectId, canWriteTypeId, configure, copyCurrentEvent, copyCurrentStructure, currentValue, getFormatFeatures, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, isEnabled, overrideFormatFeatures, setPrettyPrinter, setSchema, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBoolean, writeBooleanField, writeEmbeddedObject, writeEndArray, writeEndObject, writeFieldId, writeFieldName, writeNull, writeNullField, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writePOJO, writePOJOField, writeRaw, writeRaw, writeRaw, writeRaw, writeRaw, writeRawUTF8String, writeStartArray, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeStartObject, writeString, writeString, writeString, writeStringField, writeTypeId, writeTypePrefix, writeTypeSuffix, writeUTF8Stringpublic JsonGeneratorImpl(IOContext ctxt, int features, ObjectCodec codec)
public Version version()
GeneratorBaseversion in interface Versionedversion in class GeneratorBasepublic JsonGenerator enable(JsonGenerator.Feature f)
JsonGeneratorJsonGenerator.Feature for list of available features.enable in class GeneratorBasef - Feature to enablepublic JsonGenerator disable(JsonGenerator.Feature f)
JsonGeneratorJsonGenerator.Feature for list of features)disable in class GeneratorBasef - Feature to disablepublic JsonGenerator setHighestNonEscapedChar(int charCode)
JsonGeneratorNote that generators are NOT required to support setting of value higher than 127, because there are other ways to affect quoting (or lack thereof) of character codes between 0 and 127. Not all generators support concept of escaping, either; if so, calling this method will have no effect.
Default implementation does nothing; sub-classes need to redefine it according to rules of supported data format.
setHighestNonEscapedChar in class JsonGeneratorcharCode - 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.public int getHighestEscapedChar()
JsonGeneratorgetHighestEscapedChar in class JsonGeneratorpublic JsonGenerator setCharacterEscapes(CharacterEscapes esc)
JsonGeneratorJsonGenerators
it creates.
Default implementation does nothing and simply returns this instance.
setCharacterEscapes in class JsonGeneratoresc - CharacterEscapes to configure this generator to use, if any; null if nonepublic CharacterEscapes getCharacterEscapes()
JsonGenerators
it creates.getCharacterEscapes in class JsonGeneratorCharacterEscapes configured for this generator, if any; null if nonepublic JsonGenerator setRootValueSeparator(SerializableString sep)
JsonGenerator
Default implementation throws UnsupportedOperationException.
setRootValueSeparator in class JsonGeneratorsep - Separator to use, if any; null means that no separator is
automatically addedpublic JacksonFeatureSet<StreamWriteCapability> getWriteCapabilities()
JsonGeneratorgetWriteCapabilities in class JsonGeneratorCopyright © 2010 - 2023 Adobe. All Rights Reserved