Package org.apache.johnzon.core
Class JohnzonJsonParserImpl
- java.lang.Object
-
- org.apache.johnzon.core.JohnzonJsonParserImpl
-
- All Implemented Interfaces:
jakarta.json.stream.JsonParser
,Closeable
,AutoCloseable
,JohnzonJsonParser
- Direct Known Subclasses:
JsonInMemoryParser
,JsonStreamParserImpl
public abstract class JohnzonJsonParserImpl extends Object implements JohnzonJsonParser
Base parser which handles higher level operations which are mixtures of Reader and Parsers likegetObject(), getValue(), getArray()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JohnzonJsonParserImpl.ArrayStreamSpliterator
private static class
JohnzonJsonParserImpl.ObjectStreamSpliterator
-
Nested classes/interfaces inherited from interface org.apache.johnzon.core.JohnzonJsonParser
JohnzonJsonParser.JohnzonJsonParserWrapper
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
manualNext
private JsonProviderImpl
provider
-
Constructor Summary
Constructors Modifier Constructor Description protected
JohnzonJsonParserImpl(JsonProviderImpl provider)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description jakarta.json.JsonArray
getArray()
Stream<jakarta.json.JsonValue>
getArrayStream()
protected abstract BufferStrategy.BufferProvider<char[]>
getCharArrayProvider()
jakarta.json.JsonObject
getObject()
Stream<Map.Entry<String,jakarta.json.JsonValue>>
getObjectStream()
jakarta.json.JsonValue
getValue()
Stream<jakarta.json.JsonValue>
getValueStream()
protected abstract jakarta.json.stream.JsonParser.Event
internalNext()
protected abstract boolean
isInArray()
protected abstract boolean
isInObject()
jakarta.json.stream.JsonParser.Event
next()
void
skipArray()
void
skipObject()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.johnzon.core.JohnzonJsonParser
current, isFitLong, isNotTooLong
-
-
-
-
Field Detail
-
manualNext
private boolean manualNext
-
provider
private final JsonProviderImpl provider
-
-
Constructor Detail
-
JohnzonJsonParserImpl
protected JohnzonJsonParserImpl(JsonProviderImpl provider)
-
-
Method Detail
-
isInArray
protected abstract boolean isInArray()
- Returns:
true
if we are currently inside an array
-
isInObject
protected abstract boolean isInObject()
- Returns:
true
if we are currently inside an object
-
getCharArrayProvider
protected abstract BufferStrategy.BufferProvider<char[]> getCharArrayProvider()
-
next
public jakarta.json.stream.JsonParser.Event next()
- Specified by:
next
in interfacejakarta.json.stream.JsonParser
-
internalNext
protected abstract jakarta.json.stream.JsonParser.Event internalNext()
-
getObject
public jakarta.json.JsonObject getObject()
- Specified by:
getObject
in interfacejakarta.json.stream.JsonParser
-
getArray
public jakarta.json.JsonArray getArray()
- Specified by:
getArray
in interfacejakarta.json.stream.JsonParser
-
getValue
public jakarta.json.JsonValue getValue()
- Specified by:
getValue
in interfacejakarta.json.stream.JsonParser
-
skipObject
public void skipObject()
- Specified by:
skipObject
in interfacejakarta.json.stream.JsonParser
-
skipArray
public void skipArray()
- Specified by:
skipArray
in interfacejakarta.json.stream.JsonParser
-
getArrayStream
public Stream<jakarta.json.JsonValue> getArrayStream()
- Specified by:
getArrayStream
in interfacejakarta.json.stream.JsonParser
-
getObjectStream
public Stream<Map.Entry<String,jakarta.json.JsonValue>> getObjectStream()
- Specified by:
getObjectStream
in interfacejakarta.json.stream.JsonParser
-
getValueStream
public Stream<jakarta.json.JsonValue> getValueStream()
- Specified by:
getValueStream
in interfacejakarta.json.stream.JsonParser
-
-