LeafCursor

case class LeafCursor(path: List[String], tpe: Type, focus: Any, parent: Option[Cursor], env: Env) extends Cursor
trait Serializable
trait Product
trait Equals
trait Cursor
class Object
trait Matchable
class Any

Value members

Concrete methods

def asLeaf: Result[Json]
def asList: Result[List[Cursor]]
def asNullable: Result[Option[Cursor]]
def field(fieldName: String): Result[Cursor]
def hasField(fieldName: String): Boolean
def isLeaf: Boolean
def isList: Boolean
def isNullable: Boolean
def mkChild(path: List[String], tpe: Type, focus: Any): LeafCursor
def narrow(subtpe: TypeRef): Result[Cursor]
def narrowsTo(subtpe: TypeRef): Boolean
def withEnv(env0: Env): Cursor

Inherited methods

def as[T](`evidence$2`: ClassTag[T]): Result[T]

Yield the value at this Cursor as a value of type T if possible, an error or the left hand side otherwise.

Yield the value at this Cursor as a value of type T if possible, an error or the left hand side otherwise.

Inherited from
Cursor
def env[T](nme: String)(`evidence$1`: ClassTag[T]): Option[T]
Inherited from
Cursor
def fieldAs[T](fieldName: String)(`evidence$3`: ClassTag[T]): Result[T]

Yield the value of the field fieldName of this Cursor as a value of type T if possible, an error or the left hand side otherwise.

Yield the value of the field fieldName of this Cursor as a value of type T if possible, an error or the left hand side otherwise.

Inherited from
Cursor
def flatListPath(fns: List[String]): Result[List[Cursor]]

Yield a list of Cursors corresponding to the values generated by following the path fns from the value at this Cursor, or an error on the left hand side if there is no such path. If the field at the end of the path is a list then yield the concatenation of the lists of cursors corresponding to the field elements.

Yield a list of Cursors corresponding to the values generated by following the path fns from the value at this Cursor, or an error on the left hand side if there is no such path. If the field at the end of the path is a list then yield the concatenation of the lists of cursors corresponding to the field elements.

Inherited from
Cursor
def fullEnv: Env
Inherited from
Cursor
def hasListPath(fns: List[String]): Boolean

Does the value at this Cursor generate a list along the path fns?

Does the value at this Cursor generate a list along the path fns?

true if fns is a valid path from the value at this Cursor and passes through at least one field with a list type.

Inherited from
Cursor
def hasPath(fns: List[String]): Boolean

Does the value at this Cursor have a field identified by the path fns?

Does the value at this Cursor have a field identified by the path fns?

Inherited from
Cursor
def isNull: Boolean
Inherited from
Cursor
def listPath(fns: List[String]): Result[List[Cursor]]

Yield a list of Cursors corresponding to the values generated by following the path fns from the value at this Cursor, or an error on the left hand side if there is no such path.

Yield a list of Cursors corresponding to the values generated by following the path fns from the value at this Cursor, or an error on the left hand side if there is no such path.

Inherited from
Cursor
def nullableField(fieldName: String): Result[Cursor]

Yield a Cursor corresponding to the value of the possibly nullable field fieldName of the value at this Cursor, or an error on the left hand side if there is no such field.

Yield a Cursor corresponding to the value of the possibly nullable field fieldName of the value at this Cursor, or an error on the left hand side if there is no such field.

Inherited from
Cursor
def nullableHasField(fieldName: String): Boolean

Does the possibly nullable value at this Cursor have a field named fieldName?

Does the possibly nullable value at this Cursor have a field named fieldName?

Inherited from
Cursor
def path(fns: List[String]): Result[Cursor]

Yield a Cursor corresponding to the value of the field identified by path fns starting from the value at this Cursor, or an error on the left hand side if there is no such field.

Yield a Cursor corresponding to the value of the field identified by path fns starting from the value at this Cursor, or an error on the left hand side if there is no such field.

Inherited from
Cursor
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product