PathWrites

play.api.libs.json.PathWrites
trait PathWrites

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object OWrites.type
object Writes.type

Members list

Value members

Concrete methods

def at[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[A]
def jsPick(path: JsPath): Writes[JsValue]
def nullable[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[Option[A]]

writes a optional field in given JsPath : if None, doesn't write field at all. Please note we do not write "null" but simply omit the field when None If you want to write a "null", use ConstraintWrites.optionWithNull[A]

writes a optional field in given JsPath : if None, doesn't write field at all. Please note we do not write "null" but simply omit the field when None If you want to write a "null", use ConstraintWrites.optionWithNull[A]

Attributes

def pure[A](path: JsPath, fixed: => A)(implicit wrs: Writes[A]): OWrites[JsValue]