Package io.micronaut.json.convert
Class LazyJsonNode
java.lang.Object
io.micronaut.json.convert.LazyJsonNode
- All Implemented Interfaces:
io.micronaut.core.io.buffer.ReferenceCounted
@Internal
public final class LazyJsonNode
extends Object
implements io.micronaut.core.io.buffer.ReferenceCounted
Lazily parsed
JsonNode.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tparse(JsonMapper mapper, io.micronaut.core.type.Argument<T> type) Parse this JSON to the given type.booleanrelease()retain()voidTry to release this node if it hasn't been released already.
-
Constructor Details
-
LazyJsonNode
public LazyJsonNode(@NonNull @NonNull io.micronaut.core.io.buffer.ByteBuffer<?> buffer)
-
-
Method Details
-
parse
Parse this JSON to the given type.- Type Parameters:
T- The target type- Parameters:
mapper- The mapper to use for parsingtype- The target type- Returns:
- The parsed value
- Throws:
IOException- AJsonSyntaxExceptionor framework data binding exception
-
retain
- Specified by:
retainin interfaceio.micronaut.core.io.buffer.ReferenceCounted
-
release
public boolean release()- Specified by:
releasein interfaceio.micronaut.core.io.buffer.ReferenceCounted
-
tryRelease
@Internal public void tryRelease()Try to release this node if it hasn't been released already.
-