JsLookup

play.api.libs.json.JsLookup
final case class JsLookup(result: JsLookupResult) extends AnyVal

A value representing the value at a particular JSON path, either an actual JSON node or undefined.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def \(index: Int): JsLookupResult

Access a value of this array.

Access a value of this array.

Value parameters

index

Element index

Attributes

def \(fieldName: String): JsLookupResult

Return the property corresponding to the fieldName, supposing we have a JsObject.

Return the property corresponding to the fieldName, supposing we have a JsObject.

Value parameters

fieldName

the name of the property to look up

Attributes

Returns

the resulting JsValue wrapped in a JsLookup. If the current node is not a JsObject or doesn't have the property, a JsUndefined will be returned.

def \\(fieldName: String): Seq[JsValue]

Look up fieldName in the current object and all descendants.

Look up fieldName in the current object and all descendants.

Attributes

Returns

the list of matching nodes

def apply(index: Int): JsValue

Access a value of this array.

Access a value of this array.

Value parameters

index

Element index.

Attributes

def apply(fieldName: String): JsValue

Access a value of this array.

Access a value of this array.

Value parameters

fieldName

Element index.

Attributes

Access the head of this array.

Access the head of this array.

Attributes

Access the last element of this array.

Access the last element of this array.

Attributes

Access the tail of this array.

Access the tail of this array.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product