Attributes
Members list
Value members
Concrete methods
Returns an instance which uses f
as OWrites.writes function.
Writes a tuple of two values to a JSON object, with custom field names.
Writes a tuple of two values to a JSON object, with custom field names.
Type parameters
- A
-
the type of the first value
- B
-
the type of the second value
val tuple2Writes: OWrites[(String, Int)] = OWrites.tuple2[String, Int]("name", "age") tuple2Writes.writes("Bob" -> 30) // {"name":"Bob","age":30}
Value parameters
- name1
-
the name of the first field
- name2
-
the name of the second field
Attributes
Writes a tuple of three values to a JSON object, with custom field names.
Writes a tuple of three values to a JSON object, with custom field names.
Type parameters
- A
-
the type of the first value
- B
-
the type of the second value
- C
-
the type of the third value
val tuple3Writes: OWrites[(String, Int, Boolean)] = OWrites.tuple3[String, Int, Boolean]("name", "age", "isStudent") tuple3Writes.writes(("Bob", 30, false)) // {"name":"Bob","age":30,"isStudent":false}
Value parameters
- name1
-
the name of the first field
- name2
-
the name of the second field
- name3
-
the name of the third field
Attributes
Writes a tuple of four values to a JSON object, with custom field names.
Writes a tuple of four values to a JSON object, with custom field names.
Type parameters
- A
-
the type of the first value
- B
-
the type of the second value
- C
-
the type of the third value
- D
-
the type of the fourth value
val tuple4Writes: OWrites[(String, Int, Boolean, Double)] = OWrites.tuple4[String, Int, Boolean, Double]("name", "age", "isStudent", "score") tuple4Writes.writes(("Bob", 30, false, 91.2)) // {"name":"Bob","age":30,"isStudent":false,"score":91.2}
Value parameters
- name1
-
the name of the first field
- name2
-
the name of the second field
- name3
-
the name of the third field
- name4
-
the name of the fourth field
Attributes
Inherited methods
Attributes
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- ConstraintWrites
Attributes
- Inherited from:
- ConstraintWrites
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
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- ConstraintWrites
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
Attributes
- Inherited from:
- ConstraintWrites
Attributes
- Inherited from:
- ConstraintWrites
Attributes
- Inherited from:
- ConstraintWrites
Attributes
- Inherited from:
- PathWrites
Attributes
- Inherited from:
- ConstraintWrites
Attributes
- Inherited from:
- ConstraintWrites
Deprecated and Inherited methods
Attributes
- Deprecated
- true
- Inherited from:
- ConstraintWrites