java.lang.Object
org.eclipse.yasson.internal.deserializer.PositionChecker
- All Implemented Interfaces:
ModelDeserializer<jakarta.json.stream.JsonParser>
public class PositionChecker
extends Object
implements ModelDeserializer<jakarta.json.stream.JsonParser>
JSON document position checker.
Checks whether json parser is in expected state. If not it will try to skip to the next event, since if user defined components are involved, it is possible to expect incorrect states in terms of the last expected events. If this checker is still not in expected state, an exception is thrown.
Checks whether json parser is in expected state. If not it will try to skip to the next event, since if user defined components are involved, it is possible to expect incorrect states in terms of the last expected events. If this checker is still not in expected state, an exception is thrown.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Grouped events according to whether it is container or value. -
Constructor Summary
ConstructorDescriptionPositionChecker
(ModelDeserializer<jakarta.json.stream.JsonParser> delegate, Type rType, jakarta.json.stream.JsonParser.Event... events) Create new instance.PositionChecker
(ModelDeserializer<jakarta.json.stream.JsonParser> delegate, Type rType, PositionChecker.Checker checker) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(jakarta.json.stream.JsonParser value, DeserializationContextImpl context) Deserialize provided value or delegate deserialization to the next deserializer.toString()
-
Constructor Details
-
PositionChecker
public PositionChecker(ModelDeserializer<jakarta.json.stream.JsonParser> delegate, Type rType, PositionChecker.Checker checker) Create new instance.- Parameters:
delegate
- delegate which is call after the checkrType
- runtime typechecker
- bound group of events
-
PositionChecker
public PositionChecker(ModelDeserializer<jakarta.json.stream.JsonParser> delegate, Type rType, jakarta.json.stream.JsonParser.Event... events) Create new instance.- Parameters:
delegate
- delegate which is call after the checkrType
- runtime typeevents
- customized checked events
-
-
Method Details
-
deserialize
Description copied from interface:ModelDeserializer
Deserialize provided value or delegate deserialization to the next deserializer.- Specified by:
deserialize
in interfaceModelDeserializer<jakarta.json.stream.JsonParser>
- Parameters:
value
- value to be deserializedcontext
- deserialization context- Returns:
- deserialized value
-
toString
-