Create a JsonSplitter using the given matcher
to determine where sub-streams start and end.
Create a JsonSplitter using the given matcher
to determine where sub-streams start and end.
For example, JsonSplitter("foo")
, when applied to the json:
{ "foo": [1, 2], "bar": true }
would identify the value of the object's "foo" field as a sub-stream of JsonEvents, containing
the events ArrayStart, IndexStart(0), JLong(1), IndexEnd, IndexStart(1), JLong(2), IndexEnd, ArrayEnd
.
Any context matched by the matcher
will be passed through the joiner
functions if you
call as
, map
, or flatMap
on the resulting splitter, and thus the matched context
can be used to decide how you parse each sub-stream.
The type of the "context" matched by the matcher
A ContextMatcher used to identify where each sub-stream begins and ends, and extracts some context value to identify each sub-stream.
A new JsonSplitter that will split a stream into sub-streams identified by the matcher