public abstract class CapturingPointers extends Object
JsonParser
.
It consists of a list of pointers, such as JSON Pointers, that represent positions in a JSON structure value, an array or an object.
Its captureFromParser(JsonParser, InternalJsonValueReader)
captures JSON values by
the "capturing pointers", reading from JsonParser
. The
captured JSON values are returned as an array of JsonValue
s.
The returned array of JSON values has the same length with the number of pointers represented
by this CapturingPointers
. The indices in the returned array correspond to the indices of
the pointers represented by this CapturingPointers
.
For example, consider CapturingPointers
created like the following.
final CapturingPointers pointers = CapturingPointers.builder()
.addJsonPointer("/foo")
.addJsonPointer("/bar")
.addJsonPointer("/baz").build();
The returned array of JSON values would consist of three elements. The first element would
correspond "/foo"
, the second to "/bar"
, and the third to "/baz"
.
The term "capturing pointer" is inspired from "capturing group" of regular expressions.
Modifier and Type | Class and Description |
---|---|
static class |
CapturingPointers.Builder
Builds
CapturingPointers . |
Modifier and Type | Method and Description |
---|---|
static CapturingPointers.Builder |
builder()
Returns a new builder for
CapturingPointers . |
public static CapturingPointers.Builder builder()
CapturingPointers
.CapturingPointers