writes a optional field in given JsPath : if None, doesn't write field at all.
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]
Pure Option Writer[T] which writes "null" when None which is different
from JsPath.writeNullable
which omits the field when None
Pure Option Writer[T] which writes "null" when None which is different
from JsPath.writeNullable
which omits the field when None
Transforms the resulting JsObject using the given function, which is also applied with the initial input.
Transforms the resulting JsObject using the given function, which is also applied with the initial input. def transform(transformer: (A, JsObject) => JsObject): OWrites[A] = OWrites[A] { a => transformer(a, this.writes(a)) }
the initial writer
the transformer function