Package io.micronaut.json.convert
Class LazyJsonNode
java.lang.Object
io.micronaut.json.convert.LazyJsonNode
- All Implemented Interfaces:
ReferenceCounted
Lazily parsed
JsonNode
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
parse
(JsonMapper mapper, Argument<T> type) Parse this JSON to the given type.boolean
release()
Release a reference to this object.retain()
Retain an additional reference to this object.void
Try to release this node if it hasn't been released already.
-
Constructor Details
-
LazyJsonNode
-
-
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
- AJsonSyntaxException
or framework data binding exception
-
retain
Description copied from interface:ReferenceCounted
Retain an additional reference to this object. All retained references must be released, or there will be a leak.- Specified by:
retain
in interfaceReferenceCounted
- Returns:
- this
-
release
public boolean release()Description copied from interface:ReferenceCounted
Release a reference to this object.- Specified by:
release
in interfaceReferenceCounted
- Returns:
- Whether the reference has been released
-
tryRelease
Try to release this node if it hasn't been released already.
-