Reads/Writes a T at JsPath using provided explicit Writes[T] and implicit Reads[T]
Reads/Writes a T at JsPath using provided explicit Writes[T] and implicit Reads[T]
Reads/Writes a T at JsPath using provided explicit Reads[T] and implicit Writes[T]
Reads/Writes a T at JsPath using provided explicit Reads[T] and implicit Writes[T]
Reads/Writes a T at JsPath using provided implicit Format[T]
Reads/Writes a T at JsPath using provided implicit Format[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
JsPath.writeNullable to see behavior in writes
JsPath.readNullable to see behavior in reads
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).
JsPath.lazyWriteNullable to see behavior in writes
JsPath.lazyReadNullable to see behavior in reads
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).
JsPath.lazyWriteNullable to see behavior in writes
JsPath.lazyReadNullable to see behavior in reads
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).
JsPath.lazyWriteNullable to see behavior in writes
JsPath.lazyReadNullable to see behavior in reads
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).
JsPath.lazyWriteNullable to see behavior in writes
JsPath.lazyReadNullable to see behavior in reads
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 _)
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 _)
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 _)
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 _)
Simple Prune for simple path and only JsObject
Simple Prune for simple path and only JsObject
Pure Reads doesn't read anything but creates a JsObject based on JsPath with the given T value
Pure Reads doesn't read anything but creates a JsObject based on JsPath with the given T value
Reads a T at JsPath
Reads a T at JsPath
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 =>
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
Writes a pure value at given JsPath
Writes a pure value at given JsPath
Writes a T at given JsPath
Writes a T at given JsPath
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]
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]