implicit final class JsonSplitterApplyOps extends AnyVal
Adds Splitter.json
, for constructing json context matcher-based JsonSplitters
- Source
- package.scala
- Alphabetic
- By Inheritance
- JsonSplitterApplyOps
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toany2stringadd[JsonSplitterApplyOps] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (JsonSplitterApplyOps, B)
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toArrowAssoc[JsonSplitterApplyOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def ensuring(cond: (JsonSplitterApplyOps) => Boolean, msg: => Any): JsonSplitterApplyOps
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toEnsuring[JsonSplitterApplyOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (JsonSplitterApplyOps) => Boolean): JsonSplitterApplyOps
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toEnsuring[JsonSplitterApplyOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): JsonSplitterApplyOps
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toEnsuring[JsonSplitterApplyOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): JsonSplitterApplyOps
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toEnsuring[JsonSplitterApplyOps] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toStringFormat[JsonSplitterApplyOps] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def json[C](matcher: ContextMatcher[JsonStackElem, C])(implicit pos: CallerPos): JsonSplitter[C]
Create a Splitter for JsonEvents using the given
matcher
to determine where sub-streams start and end.Create a Splitter for JsonEvents using the given
matcher
to determine where sub-streams start and end. For example,Splitter.json("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 thejoiner
functions if you callas
,map
, orflatMap
on the resulting splitter, and thus the matched context can be used to decide how you parse each sub-stream.- C
The type of the "context" matched by the
matcher
- matcher
A ContextMatcher used to identify where each sub-stream begins and ends, and extracts some context value to identify each sub-stream.
- pos
Used to construct a SpacFrameElement if a parser constructed from this splitter fails
- returns
A new JsonSplitter that will split a stream into sub-streams identified by the
matcher
- def toString(): String
- Definition Classes
- Any
Deprecated Value Members
- def →[B](y: B): (JsonSplitterApplyOps, B)
- Implicit
- This member is added by an implicit conversion from JsonSplitterApplyOps toArrowAssoc[JsonSplitterApplyOps] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.