A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/play/api/libs/json/JsPath.html below:

JsPath - play.api.libs.json.JsPath

  • final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  • final def ##(): Int
    Definition Classes
    AnyRef → Any
  • def ++(other: JsPath): JsPath
  • final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  • def \(idx: Int): JsPath
  • def \(child: Symbol): JsPath
  • def \(child: String): JsPath
  • def \\(child: Symbol): JsPath
  • def \\(child: String): JsPath
  • def apply(json: JsValue): List[JsValue]
  • def apply(idx: Int): JsPath
  • def applyTillLast(json: JsValue): Either[JsError, JsResult[JsValue]]
  • final def asInstanceOf[T0]: T0
  • def asSingleJsResult(json: JsValue): JsResult[JsValue]
  • def asSingleJson(json: JsValue): JsLookupResult
  • def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • def compose(other: JsPath): JsPath
  • final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  • def format[T](w: Writes[T])(implicit r: Reads[T]): OFormat[T]

    Reads/Writes a T at JsPath using provided explicit Writes[T] and implicit Reads[T]

  • def format[T](r: Reads[T])(implicit w: Writes[T]): OFormat[T]

    Reads/Writes a T at JsPath using provided explicit Reads[T] and implicit Writes[T]

  • def format[T](implicit f: Format[T]): OFormat[T]

    Reads/Writes a T at JsPath using provided implicit Format[T]

  • def formatNullable[T](implicit f: Format[T]): OFormat[Option[T]]

    Reads/Writes a Option[T] (optional or nullable field) at given JsPath

    Reads/Writes a Option[T] (optional or nullable field) at given JsPath

    See also

    JsPath.writeNullable to see behavior in writes

    JsPath.readNullable to see behavior in reads

  • final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  • final def isInstanceOf[T0]: Boolean
  • object json
  • def lazyFormat[T](r: ⇒ Reads[T], w: ⇒ Writes[T]): OFormat[T]

    Lazy Reads/Writes a T at given JsPath using explicit Reads[T] and Writes[T] (useful in case of recursive case classes).

    Lazy Reads/Writes a T at given JsPath using explicit Reads[T] and Writes[T] (useful in case of recursive case classes).

    See also

    JsPath.lazyWriteNullable to see behavior in writes

    JsPath.lazyReadNullable to see behavior in reads

  • def lazyFormat[T](f: ⇒ Format[T]): OFormat[T]

    Lazy Reads/Writes a T at given JsPath using implicit Format[T] (useful in case of recursive case classes).

    Lazy Reads/Writes a T at given JsPath using implicit Format[T] (useful in case of recursive case classes).

    See also

    JsPath.lazyWriteNullable to see behavior in writes

    JsPath.lazyReadNullable to see behavior in reads

  • def lazyFormatNullable[T](r: ⇒ Reads[T], w: ⇒ Writes[T]): OFormat[Option[T]]

    Lazy Reads/Writes a Option[T] (optional or nullable field) at given JsPath using explicit Reads[T] and Writes[T] (useful in case of recursive case classes).

    Lazy Reads/Writes a Option[T] (optional or nullable field) at given JsPath using explicit Reads[T] and Writes[T] (useful in case of recursive case classes).

    See also

    JsPath.lazyWriteNullable to see behavior in writes

    JsPath.lazyReadNullable to see behavior in reads

  • def lazyFormatNullable[T](f: ⇒ Format[T]): OFormat[Option[T]]

    Lazy Reads/Writes a Option[T] (optional or nullable field) at given JsPath using implicit Format[T] (useful in case of recursive case classes).

    Lazy Reads/Writes a Option[T] (optional or nullable field) at given JsPath using implicit Format[T] (useful in case of recursive case classes).

    See also

    JsPath.lazyWriteNullable to see behavior in writes

    JsPath.lazyReadNullable to see behavior in reads

  • def lazyRead[T](r: ⇒ Reads[T]): Reads[T]

    Reads a T at JsPath using the explicit Reads[T] passed by name which is useful in case of recursive case classes for ex.

    Reads a T at JsPath using the explicit Reads[T] passed by name which is useful in case of recursive case classes for ex.

    case class User(id: Long, name: String, friend: User)
    
    implicit lazy val UserReads: Reads[User] = (
      (__ \ 'id).read[Long] and
      (__ \ 'name).read[String] and
      (__ \ 'friend).lazyRead(UserReads)
    )(User.apply _)
  • def lazyReadNullable[T](r: ⇒ Reads[T]): Reads[Option[T]]

    Reads lazily a Option[T] search optional or nullable field at JsPath using the explicit Reads[T] passed by name which is useful in case of recursive case classes for ex.

    Reads lazily a Option[T] search optional or nullable field at JsPath using the explicit Reads[T] passed by name which is useful in case of recursive case classes for ex.

    case class User(id: Long, name: String, friend: Option[User])
    
    implicit lazy val UserReads: Reads[User] = (
      (__ \ 'id).read[Long] and
      (__ \ 'name).read[String] and
      (__ \ 'friend).lazyReadNullable(UserReads)
    )(User.apply _)
  • def lazyWrite[T](w: ⇒ Writes[T]): OWrites[T]

    Writes a T at JsPath using the explicit Writes[T] passed by name which is useful in case of recursive case classes for ex

    Writes a T at JsPath using the explicit Writes[T] passed by name which is useful in case of recursive case classes for ex

    case class User(id: Long, name: String, friend: User)
    
    implicit lazy val UserReads: Reads[User] = (
      (__ \ 'id).write[Long] and
      (__ \ 'name).write[String] and
      (__ \ 'friend).lazyWrite(UserReads)
    )(User.apply _)
  • def lazyWriteNullable[T](w: ⇒ Writes[T]): OWrites[Option[T]]

    Writes a Option[T] at JsPath using the explicit Writes[T] passed by name which is useful in case of recursive case classes for ex

    Writes a Option[T] at JsPath using the explicit Writes[T] passed by name which is useful in case of recursive case classes for ex

    Please note that it's not writeOpt to be coherent with readNullable

    case class User(id: Long, name: String, friend: Option[User])
    
    implicit lazy val UserReads: Reads[User] = (
      (__ \ 'id).write[Long] and
      (__ \ 'name).write[String] and
      (__ \ 'friend).lazyWriteNullable(UserReads)
    )(User.apply _)
  • final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  • final def notify(): Unit
    Definition Classes
    AnyRef
  • final def notifyAll(): Unit
    Definition Classes
    AnyRef
  • val path: List[PathNode]
  • def prune(js: JsValue): JsResult[JsObject]

    Simple Prune for simple path and only JsObject

  • def read[T](t: T): Reads[T]

    Pure Reads doesn't read anything but creates a JsObject based on JsPath with the given T value

  • def read[T](implicit r: Reads[T]): Reads[T]

    Reads a T at JsPath

  • def readNullable[T](implicit r: Reads[T]): Reads[Option[T]]

    Reads a Option[T] search optional or nullable field at JsPath (field not found or null is None and other cases are Error).

    Reads a Option[T] search optional or nullable field at JsPath (field not found or null is None and other cases are Error).

    It runs through JsValue following all JsPath nodes on JsValue except last node: - If one node in JsPath is not found before last node => returns JsError( "missing-path" ) - If all nodes are found till last node, it runs through JsValue with last node =>

  • def rw[T](implicit r: Reads[T], w: Writes[T]): OFormat[T]

    Reads/Writes a T at JsPath using provided implicit Reads[T] and Writes[T]

    Reads/Writes a T at JsPath using provided implicit Reads[T] and Writes[T]

    Please note we couldn't call it "format" to prevent conflicts

  • final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  • def toJsonString: String
  • def toString(): String
    Definition Classes
    JsPath → AnyRef → Any
  • final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  • def write[T](t: T)(implicit w: Writes[T]): OWrites[JsValue]

    Writes a pure value at given JsPath

  • def write[T](implicit w: Writes[T]): OWrites[T]

    Writes a T at given JsPath

  • def writeNullable[T](implicit w: Writes[T]): OWrites[Option[T]]

    Writes a Option[T] at given JsPath If None => doesn't write the field (never writes null actually) else => writes the field using implicit Writes[T]


  • RetroSearch is an open source project built by @garambo | Open a GitHub Issue

    Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

    HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4