|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Base64Variants.MIME
Base64Variants.MIME_NO_LINEFEEDS
Base64Variants.PEM
Base64Variants.MODIFIED_FOR_URL
ByteArrayOutputStream
in usage, but more geared to Jackson use cases internally.BytesToNameCanonicalizer
which aims at more localized
memory access due to flattening of name quad data.char[]
is something that actual
parser implementations can take advantage of, over having to
use Reader
.
JsonGenerator.setSchema(com.fasterxml.jackson.core.FormatSchema)
).
JsonParser.setSchema(com.fasterxml.jackson.core.FormatSchema)
).
JsonReadContext.setCurrentValue(Object)
)
that should not be retained, and returns parent (as would
JsonReadContext.getParent()
do).
JsonWriteContext.setCurrentValue(Object)
)
that should not be retained, and returns parent (as would
JsonWriteContext.getParent()
do).
JsonParser.hasCurrentToken()
returns false, and
JsonParser.getCurrentToken()
null).
JsonParser.Feature.AUTO_CLOSE_SOURCE
is enabled.
JsonFactory
used for constructing
JSON parser (JsonParser
)
and generator
(JsonGenerator
)
instances.Comparable
) is to prevent constructing a
reference without type information.
IllegalArgumentException
is thrown.
JsonParser.Feature
for list of features)
JsonParser.Feature
for list of features)
JsonGenerator.Feature
for list of features)
JsonGenerator.Feature
for list of available features.
JsonParser.Feature
for list of features)
BigDecimal
.
JsonFactory
that has
the same settings as this instance, but is otherwise
independent (i.e.
JsonFactory.createGenerator(OutputStream, JsonEncoding)
instead.
JsonFactory.createGenerator(Writer)
instead.
JsonFactory.createGenerator(OutputStream)
instead.
JsonFactory.createParser(File)
instead.
JsonFactory.createParser(URL)
instead.
JsonFactory.createParser(InputStream)
instead.
JsonFactory.createParser(Reader)
instead.
JsonFactory.createParser(byte[])
instead.
JsonFactory.createParser(byte[],int,int)
instead.
JsonFactory.createParser(String)
instead.
JsonParser
for
parsing content which is assumed to be in detected data format.
JsonFactory
instance.
JsonFactory
instances to use for actual low-level
detection.DataFormatDetector
when requested
to detect format of given input data.ByteArrayBuilder
.
JsonFactory
instance when
creating parser given an InputStream
, when this decorator
has been registered.
JsonFactory
instance when
creating parser on given "raw" byte source.
JsonFactory
instance when
creating parser given an Reader
, when this decorator
has been registered.
JsonFactory
instance when
creating generator for given OutputStream
, when this decorator
has been registered.
JsonFactory
instance when
creating generator for given Writer
, when this decorator
has been registered.
DefaultPrettyPrinter
(unless
overridden).indent
string to indent one level
and the eol
string to separate lines.
PrettyPrinter
implementation that uses 2-space
indentation with platform-default linefeeds.JsonGeneratorDelegate.copyCurrentEvent(com.fasterxml.jackson.core.JsonParser)
, JsonGeneratorDelegate.copyCurrentStructure(com.fasterxml.jackson.core.JsonParser)
, JsonGeneratorDelegate.writeTree(com.fasterxml.jackson.core.TreeNode)
and JsonGeneratorDelegate.writeObject(java.lang.Object)
)
are to be called (true), or handled by this object (false).
JsonFactory.Feature
for list of features)
JsonParser.Feature
for list of features)
JsonGenerator.Feature
for list of features)
JsonGenerator.Feature
for list of features)
JsonParser.Feature
for list of features)
JsonParser.Feature.STRICT_DUPLICATE_DETECTION
is enabled.JsonPointer.matches()
).
JsonFactory.Feature
for list of features)
JsonParser.Feature
for list of features)
JsonGenerator.Feature
for list of features)
JsonGenerator.Feature
for list of available features.
JsonParser.Feature
for list of features)
CharacterEscapes.getEscapeSequence(int)
is needed to figure out exact escape
sequence to output.
TokenFilter.INCLUDE_ALL
was returned.
TokenFilter.INCLUDE_ALL
was returned.
JsonGeneratorDelegate
that allows use of
TokenFilter
for outputting a subset of content that
caller tries to generate.JsonParserDelegate
that allows use of
TokenFilter
for outputting a subset of content that
is visible to callerInputStream
) given has, as per configuration of this detector
instance.
JsonFactory.getFormatName()
JsonParser
and JsonGenerator
implementations to further
specify structure of expected format.JsonToken.VALUE_NUMBER_INT
and
it can not be used as a Java long primitive type due to its
magnitude.
JsonParser.getBinaryValue(Base64Variant)
that defaults to using
Base64Variants.getDefaultVariant()
as the default encoding.
JsonToken.VALUE_TRUE
or
JsonToken.VALUE_FALSE
.
JsonToken.VALUE_NUMBER_INT
and
it can be expressed as a value of Java byte primitive type.
JsonGenerator
s
it creates.
JsonGenerator
s
it creates.
JsonGenerator
s
it creates.
JsonGenerator.writeObject(java.lang.Object)
).
ObjectCodec
associated with this
parser, if any.
JsonToken.FIELD_NAME
s it will
be the same as what JsonParser.getText()
returns;
for field values it will be preceding field name;
and for others (array values, root-level values) null.
JsonParser.getCurrentToken()
but that returns an
int
instead of JsonToken
(enum value).
getOutputContext().getCurrentValue();
getParsingContext().getCurrentValue();
JsonToken.VALUE_NUMBER_FLOAT
or
JsonToken.VALUE_NUMBER_INT
.
JsonToken.VALUE_NUMBER_FLOAT
and
it can be expressed as a Java double primitive type.
JsonToken.VALUE_EMBEDDED_OBJECT
.
JsonFactory
) codec will use for data binding.
JsonGenerator.Feature
s.
JsonParser.Feature
s.
JsonToken.VALUE_NUMBER_FLOAT
and
it can be expressed as a Java float primitive type.
FormatFeature
s, format-specific
on/off configuration settings.
FormatFeature
s, format-specific
on/off configuration settings.
FormatFeature
that a parser
JsonParser
produced by this factory would accept, if any;
null
returned if none.
FormatFeature
that a parser
JsonGenerator
produced by this factory would accept, if any;
null
returned if none.
InputStream
or Reader
, depending on what
parser was constructed with.
JsonToken.VALUE_NUMBER_INT
and
it can be expressed as a value of Java int primitive type.
ObjectCodec.getFactory()
instead.
JsonParser.clearCurrentToken()
.
JsonToken.VALUE_NUMBER_INT
and
it can be expressed as a Java long primitive type.
(1 << N)
JsonFactory
that represents format that data matched.
MatchStrength.INCONCLUSIVE
.
JsonToken.VALUE_NUMBER_INT
or
JsonToken.VALUE_NUMBER_FLOAT
, returns
one of JsonParser.NumberType
constants; otherwise returns null.
JsonProcessingException.getMessage()
adds.
OutputStream
or Writer
, depending on what
generator was constructed with.
PrettyPrinter
; returns it if so, null if none configured.
JsonParser
or JsonGenerator
for exceptions that originate from streaming API.
Class
of resolved type.
JsonToken.VALUE_NUMBER_INT
and
it can be expressed as a value of Java short primitive type.
ReaderBasedJsonParser.nextToken()
, or
after encountering end-of-input), returns null.
JsonParser.nextToken()
, or
after encountering end-of-input), returns null.
char
array regardless of whether they were collected in a segmented
fashion or not.
JsonParser.getText()
, but that will return
underlying (unmodifiable) character array that contains
textual value, instead of constructing a String object
to contain this information.
JsonParser.getTextCharacters()
, to know length
of String stored in returned buffer.
JsonParser.getTextCharacters()
, to know offset
of the first text content character within buffer.
String
.
String
.
ByteSourceJsonBootstrapper
);
supports UTF-8, for example.
TextBuffer.getTextBuffer()
.
JsonParser.getTextCharacters()
would be the most efficient
way to access textual content for the event parser currently
points to.
return getCurrentTokenId() == id
but may be more efficiently implemented.
return getCurrentTokenId() == id
but may be more efficiently implemented.
JsonToken.VALUE_EMBEDDED_OBJECT
JsonToken.END_ARRAY
JsonToken.END_OBJECT
JsonToken.VALUE_FALSE
JsonToken.FIELD_NAME
JsonToken
is available: either because JsonParser
has not been
advanced to first token, or because no more tokens will be
available (end-of-input or explicit closing of parser}.
JsonToken.NOT_AVAILABLE
, used in
cases where a token may become available when more input
is available: this occurs in non-blocking use cases.
JsonToken.VALUE_NULL
JsonToken.VALUE_NUMBER_FLOAT
JsonToken.VALUE_NUMBER_INT
JsonToken.START_ARRAY
JsonToken.START_OBJECT
JsonToken.VALUE_STRING
JsonToken.VALUE_TRUE
int
value
should be included in output or not.
long
value
should be included in output or not.
float
value
should be included in output or not.
double
value
should be included in output or not.
BigDecimal
value
should be included in output or not.
BigInteger
value
should be included in output or not.
NumberInput.inLongRange(char[],int,int,boolean)
, but
with String argument
InputStream
and buffers it as necessary.Instantiatable.createInstance()
method.JsonParser.Feature
is enabled.
JsonToken.START_ARRAY
) when start array is expected.
JsonParser.isExpectedStartArrayToken()
, but checks whether stream
currently points to JsonToken.START_OBJECT
.
this == JsonToken.END_OBJECT || this == JsonToken.END_ARRAY
this == JsonToken.START_OBJECT || this == JsonToken.START_ARRAY
Version.isUnknownVersion()
JsonParser
)
and writer (aka generator, JsonGenerator
)
instances.JsonFactory
.UTF8JsonGenerator
and WriterBasedJsonGenerator
.JsonParseException.getProcessor()
) to
specified parser.
JsonParser
,
to allow for simple overridability of basic parsing functionality.JsonParser
s to create a single logical sequence of
tokens, as a single JsonParser
.TokenFilter
implementation that takes a single
JsonPointer
and matches a single value accordingly.JsonStreamContext
, which implements
core methods needed, and also exposes
more complete API to parser implementation classes.JsonToken.id()
.JsonStreamContext
, which implements
core methods needed, and also exposes
more complete API to generator implementation classes.InputStream
implementation that is used to "unwind" some
data previously read from an input stream; so that as long as some of
that data remains, it's returned; but as long as it's read, we'll
just use data from the underlying original stream.Base64Variants.MIME
which does not
use linefeeds (max line length set to infinite).
PrettyPrinter
implementation that adds no indentation,
just implements everything necessary for value output to work
as expected, and provide simpler extension points to allow
for creating simple custom implementations that add specific
decoration or overrides.InputStream
.JsonParser.nextToken()
) and
if it is JsonToken.VALUE_TRUE
or JsonToken.VALUE_FALSE
returns matching Boolean value; otherwise return null.
EOFException
.
JsonParser.nextToken()
) and
verifies whether it is JsonToken.FIELD_NAME
with specified name
and returns result of that comparison.
JsonParser.nextToken()
) and
verifies whether it is JsonToken.FIELD_NAME
; if it is,
returns same as JsonParser.getCurrentName()
, otherwise null.
JsonParser.nextToken()
) and
if it is JsonToken.VALUE_NUMBER_INT
returns 32-bit int value;
otherwise returns specified default value
It is functionally equivalent to:
JsonParser.nextToken()
) and
if it is JsonToken.VALUE_NUMBER_INT
returns 64-bit long value;
otherwise returns specified default value
It is functionally equivalent to:
JsonParser.nextToken()
) and
if it is JsonToken.VALUE_STRING
returns contained String value;
otherwise returns null.
JsonToken.isNumeric()
),
returns native type that node uses to store the numeric value;
otherwise returns null.
JsonParser
and
JsonGenerator
use to serialize and deserialize regular
Java objects (POJOs aka Beans).FormatFeature
s,
by specifying values (set / clear) along with a mask, to determine
which features to change, if any.
FormatFeature
s,
by specifying values (set / clear) along with a mask, to determine
which features to change, if any.
mask
.
mask
.
JsonParser
implementations.JsonParser
implementations, but does not add any additional fields that depend
on particular method of obtaining input.PackageVersion
classes to decode version injected by Maven build.
Base64Variants.MIME
: it is otherwise
identical, except that it mandates shorter line length.
JsonParser.getBigIntegerValue()
,
especially when value can be large.
JsonParser.readBinaryValue(OutputStream)
but allows explicitly
specifying base64 variant to use.
JsonParser
, which is
based on a Reader
to handle low-level character
conversion tasks.Reader
, and buffer allocation
can be done using default mechanism.
TreeNode
instances.
Boolean
).
Collection
and
Map
).
Boolean
).
TreeNode
of resulting model.
ObjectCodec
is needed for binding data parsed
using JsonParser
constructed by this factory
(which typically also implies the same for serialization
with JsonGenerator
).
ObjectCodec
is needed for binding data parsed
using JsonParser
constructed by this factory
(which typically also implies the same for serialization
with JsonGenerator
).
StringWriter
, based on using segmented
internal buffer.JsonGenerator
s
it creates.
JsonGenerator
s
it creates.
ObjectCodec
(typically
a com.fasterxml.jackson.databind.ObjectMapper
)
with this factory (and more importantly, parsers and generators
it constructs).
JsonGenerator.writeObject(java.lang.Object)
).
ObjectCodec
associated with this
parser, if any.
getOutputContext().setCurrentValue(v);
getParsingContext().setCurrentValue(v);
JsonStreamContext.getCurrentValue()
; typically
called indirectly through JsonParser.setCurrentValue(java.lang.Object)
or JsonGenerator.setCurrentValue(java.lang.Object)
).
JsonGenerator.overrideStdFeatures(int, int)
instead
JsonParser.overrideStdFeatures(int, int)
instead
ParserMinimalBase
, to keep
state correct here.
JsonToken.START_OBJECT
or JsonToken.START_ARRAY
.
DefaultPrettyPrinter.withSpacesInObjectEntries()
and DefaultPrettyPrinter.withoutSpacesInObjectEntries()
StringBuffer
, with
following differences:
TextBuffer uses segments character arrays, to avoid having
to do additional array copies when array is not big enough.TypeFactory
from mapper package).
FilteringGeneratorDelegate
.JsonStreamContext
, used when filtering
content being read or written (based on TokenFilter
).TextBuffer.contentsAsString()
, since it's not guaranteed that resulting
String is cached.
JsonParser
instance for
iterating over contents of the tree that this node is root of.
TreeNode.traverse()
, but additionally passes ObjectCodec
to use if JsonParser.readValueAs(Class)
is used (otherwise caller must call
JsonParser.setCodec(com.fasterxml.jackson.core.ObjectCodec)
on response explicitly).
JsonParser
for reading
contents of a JSON tree, as if it was external serialized
JSON content.
TreeNode
instances using Streaming API.ObjectCodec
to have some level
of interoperability.ResolvedType
implementation
(implemented by JavaType
from "databind" bundle) to be used.DefaultPrettyPrinter
).
JsonParser
, which is
based on a InputStream
as the input source.JsonPointer.compile(java.lang.String)
; added to make instances automatically
deserializable by Jackson databind.
Version
for details).
Version
s.JsonGenerator
,
to be accessed using JsonGenerationException.getProcessor()
.
JsonParser
,
to be accessed using JsonParseException.getProcessor()
.
JsonGenerator.writeBinary(Base64Variant,byte[],int,int)
,
but default to using the Jackson default Base64 variant
(which is Base64Variants.MIME_NO_LINEFEEDS
).
JsonGenerator.writeBinary(Base64Variant,byte[],int,int)
,
but assumes default to using the Jackson default Base64 variant
(which is Base64Variants.MIME_NO_LINEFEEDS
).
JsonGenerator.writeBinary(Base64Variant,InputStream,int)
,
but assumes default to using the Jackson default Base64 variant
(which is Base64Variants.MIME_NO_LINEFEEDS
).
JsonGenerator.writeBinary(Base64Variant,byte[],int,int)
,
but where input is provided through a stream, allowing for incremental
writes without holding the whole input in memory.
JsonGenerator.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.
TokenFilterContext.writePath(JsonGenerator)
called when all we
need is immediately surrounding Object.
JsonGenerator.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).
JsonGenerator.writeRawValue(String)
, but potentially more
efficient as it may be able to use pre-encoded content (similar to
JsonGenerator.writeRaw(SerializableString)
.
JsonGenerator
that outputs JSON content using a Writer
which handles character encoding.JsonGenerator.writeStartArray()
, but also specifying how many
elements will be written for the array before calling
JsonGenerator.writeEndArray()
.
JsonGenerator.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.
JsonGenerator.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).
TokenFilter.INCLUDE_ALL
) and no more
checks are made; if `true` then filtering will be applied as necessary
until end of content.
TokenFilter.INCLUDE_ALL
) and no more
checks are made; if `true` then filtering will be applied as necessary
until end of content.
JsonPointer.toString()
should be as efficient as possible.
ParserBase.getBinaryValue(com.fasterxml.jackson.core.Base64Variant)
will not need to decode data more
than once.
JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS
).
_charBuffer
FilteringGeneratorDelegate._checkParentPath()
used when checking
parent for a property name to be included with value: rules are slightly
different.
PrettyPrinter
for case of "just use the default one", when GeneratorBase.useDefaultPrettyPrinter()
is called.
JsonParseException
s
based on current state of the parser
Writer
and context object.
InputStream
and context object.
Reader
object for reading content.
char[]
object for accessing content.
Reader
object for reading content
passed as raw byte array.
OutputStream
and context object, using UTF-8 encoding.
ParserMinimalBase.nextToken()
, if any.
FilteringParserDelegate.nextToken()
, if any.
FilteringParserDelegate._headContext
is "ahead" of context exposed to
caller, this context points to what is currently exposed to caller.
JsonGenerator.Feature
s
are enabled.
JsonParser.Feature
s
are enabled.
2 * _hashSize
entries of 16 bytes (4 ints), arranged in a cascading lookup
structure (details of which may be tweaked depending on expected rates
of collisions).
ByteQuadsCanonicalizer._hashArea
; which is
at most 1/8
of actual size of the underlying array (4-int slots,
primary covers only half of the area; plus, additional area for longer
symbols after hash area).
FilteringParserDelegate._exposedContext
, and at other times is ahead
of it.
_buckets.length - 1
, when _buckets.length is
a power of two.
ParserMinimalBase.clearCurrentToken()
was called.
FilteringParserDelegate.clearCurrentToken()
was called.
ByteQuadsCanonicalizer._hashArea
that follows main slots and contains
quads for longer names (13 bytes or longers), and points to the
first available int that may be used for appending quads of the next
long name.
TokenFilter.INCLUDE_ALL
has been returned
TokenFilter.INCLUDE_ALL
has been returned.
DataFormatMatcher._match
Integer.MAX_VALUE
if not limited).
ParserMinimalBase.getTextCharacters()
method (instead of String
returning alternatives)
String
instances matching
entries in ByteQuadsCanonicalizer._hashArea
.
ParserBase._inputPtr
at the time when the first character of
name token was read.
ParserBase._inputPtr
at the time when the first character of
name token was read.
JsonParserSequence._parsers
.
ObjectMapper
, but that abstract is not part of core
package.
UTF8JsonGenerator._outputStream
.
WriterBasedJsonGenerator._writer
.
char
s that we know will always fit
in the output buffer after escaping
Base64Variant.PADDING_CHAR_NONE
if not).
InputAccessor.Std._buffer
.
ThreadLocal
contains a SoftReference
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.
JsonGenerationException
with given base message.
ByteQuadsCanonicalizer._hashArea
where secondary entries start
1 << _tertiaryShift
is the size, and shift value
is also used for translating from primary offset into
tertiary bucket (shift right by 4 + _tertiaryShift
).
ByteQuadsCanonicalizer._hashArea
where tertiary entries start
ThreadLocal
contains a SoftReference
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.
_writeFieldName
, off-lined
to keep the "fast path" as simple (and hopefully fast) as possible.
_writeFieldName
, off-lined
to keep the "fast path" as simple (and hopefully fast) as possible.
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |