object Writes extends PathWrites with ConstraintWrites with DefaultWrites with GeneratedWrites
- Alphabetic
- By Inheritance
- Writes
- GeneratedWrites
- DefaultWrites
- EnumerationWrites
- LowPriorityWrites
- EnvWrites
- ConstraintWrites
- PathWrites
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait TemporalFormatter[T <: Temporal] extends AnyRef
Typeclass to implement way of formatting of Java8 temporal types.
Typeclass to implement way of formatting of Java8 temporal types.
- Definition Classes
- EnvWrites
Value Members
- implicit object BigDecimalWrites extends Writes[BigDecimal]
Serializer for BigDecimal types.
Serializer for BigDecimal types.
- Definition Classes
- DefaultWrites
- implicit object BigIntWrites extends Writes[BigInt]
Serializer for BigInt type.
Serializer for BigInt type.
- Definition Classes
- DefaultWrites
- implicit object BigIntegerWrites extends Writes[BigInteger]
Serializer for BigInteger type.
Serializer for BigInteger type.
- Definition Classes
- DefaultWrites
- implicit object BooleanWrites extends Writes[Boolean]
Serializer for Boolean types.
Serializer for Boolean types.
- Definition Classes
- DefaultWrites
- implicit object ByteWrites extends Writes[Byte]
Serializer for Byte types.
Serializer for Byte types.
- Definition Classes
- DefaultWrites
- implicit object DoubleWrites extends Writes[Double]
Serializer for Double types.
Serializer for Double types.
- Definition Classes
- DefaultWrites
- implicit object FloatWrites extends Writes[Float]
Serializer for Float types.
Serializer for Float types.
- Definition Classes
- DefaultWrites
- implicit object IntWrites extends Writes[Int]
Serializer for Int types.
Serializer for Int types.
- Definition Classes
- DefaultWrites
- implicit object LongWrites extends Writes[Long]
Serializer for Long types.
Serializer for Long types.
- Definition Classes
- DefaultWrites
- implicit object ShortWrites extends Writes[Short]
Serializer for Short types.
Serializer for Short types.
- Definition Classes
- DefaultWrites
- implicit object StringWrites extends Writes[String]
Serializer for String types.
Serializer for String types.
- Definition Classes
- DefaultWrites
- implicit object UuidWrites extends Writes[UUID]
Serializer for java.util.UUID
Serializer for java.util.UUID
- Definition Classes
- DefaultWrites
- object TemporalFormatter
Formatting companion
Formatting companion
- Definition Classes
- EnvWrites
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val DefaultInstantWrites: Writes[Instant]
The default typeclass to write a
java.time.Instant
, using '2011-12-03T10:15:30Z' format.The default typeclass to write a
java.time.Instant
, using '2011-12-03T10:15:30Z' format.- Definition Classes
- EnvWrites
- implicit val DefaultLocalDateTimeWrites: Writes[LocalDateTime]
The default typeclass to write a
java.time.LocalDateTime
, using '2011-12-03T10:15:30' format.The default typeclass to write a
java.time.LocalDateTime
, using '2011-12-03T10:15:30' format.- Definition Classes
- EnvWrites
- implicit val DefaultLocalDateWrites: Writes[LocalDate]
The default typeclass to write a
java.time.LocalDate
, using '2011-12-03' format.The default typeclass to write a
java.time.LocalDate
, using '2011-12-03' format.- Definition Classes
- EnvWrites
- implicit val DefaultLocalTimeWrites: Writes[LocalTime]
The default typeclass to write a
java.time.LocalTime
, using '10:15:30' format.The default typeclass to write a
java.time.LocalTime
, using '10:15:30' format.- Definition Classes
- EnvWrites
- implicit val DefaultOffsetDateTimeWrites: Writes[OffsetDateTime]
The default typeclass to write a
java.time.OffsetDateTime
, using '2011-12-03T10:15:30+02:00' format.The default typeclass to write a
java.time.OffsetDateTime
, using '2011-12-03T10:15:30+02:00' format.- Definition Classes
- EnvWrites
- implicit val DefaultZonedDateTimeWrites: Writes[ZonedDateTime]
The default typeclass to write a
java.time.ZonedDateTime
, using '2011-12-03T10:15:30+01:00[Europe/Paris]' format.The default typeclass to write a
java.time.ZonedDateTime
, using '2011-12-03T10:15:30+01:00[Europe/Paris]' format.- Definition Classes
- EnvWrites
- val InstantEpochMilliWrites: Writes[Instant]
Serializer for
java.time.Instant
as JSON number.Serializer for
java.time.Instant
as JSON number. The number of milliseconds since epoch is used.import java.time.Instant import play.api.libs.json.Writes implicit val inWrites: Writes[Instant] = Writes.InstantEpochMilliWrites
- Definition Classes
- EnvWrites
- val LocalDateEpochMilliWrites: Writes[LocalDate]
Serializer for
java.time.LocalDate
as JSON number.Serializer for
java.time.LocalDate
as JSON number. The number of milliseconds since epoch is used.import java.time.LocalDate import play.api.libs.json.Writes implicit val ldnWrites: Writes[LocalDate] = Writes.LocalDateEpochMilliWrites
- Definition Classes
- EnvWrites
- val LocalDateTimeEpochMilliWrites: Writes[LocalDateTime]
Serializer for
java.time.LocalDateTime
as JSON number.Serializer for
java.time.LocalDateTime
as JSON number. The number of milliseconds since epoch is used.import java.time.LocalDateTime import play.api.libs.json.Writes implicit val ldtnWrites = Writes.LocalDateTimeEpochMilliWrites
- Definition Classes
- EnvWrites
- val LocalTimeNanoOfDayWrites: Writes[LocalTime]
Serializer for
java.time.LocalTime
as JSON number.Serializer for
java.time.LocalTime
as JSON number. The nano of day is written.import java.time.LocalTime import play.api.libs.json.Writes implicit val ltnWrites = Writes.LocalTimeNanoOfDayWrites
- Definition Classes
- EnvWrites
- implicit val NoneWrites: Writes[None.type]
Serializer for JsNull.
Serializer for JsNull.
import play.api.libs.json.Json Json.obj("foo" -> None) // equivalent to Json.obj("foo" -> JsNull)
- Definition Classes
- DefaultWrites
- implicit def OptionWrites[T](implicit fmt: Writes[T]): Writes[Option[T]]
Serializer for Option.
Serializer for Option.
- Definition Classes
- DefaultWrites
- implicit def Tuple10W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple11W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple12W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple13W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple14W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple15W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple16W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple17W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple18W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17], arg17: Writes[T18]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple19W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17], arg17: Writes[T18], arg18: Writes[T19]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple1W[T1](implicit arg0: Writes[T1]): Writes[(T1)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple20W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17], arg17: Writes[T18], arg18: Writes[T19], arg19: Writes[T20]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple21W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17], arg17: Writes[T18], arg18: Writes[T19], arg19: Writes[T20], arg20: Writes[T21]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple22W[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9], arg9: Writes[T10], arg10: Writes[T11], arg11: Writes[T12], arg12: Writes[T13], arg13: Writes[T14], arg14: Writes[T15], arg15: Writes[T16], arg16: Writes[T17], arg17: Writes[T18], arg18: Writes[T19], arg19: Writes[T20], arg20: Writes[T21], arg21: Writes[T22]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple2W[T1, T2](implicit arg0: Writes[T1], arg1: Writes[T2]): Writes[(T1, T2)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple3W[T1, T2, T3](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3]): Writes[(T1, T2, T3)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple4W[T1, T2, T3, T4](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4]): Writes[(T1, T2, T3, T4)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple5W[T1, T2, T3, T4, T5](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5]): Writes[(T1, T2, T3, T4, T5)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple6W[T1, T2, T3, T4, T5, T6](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6]): Writes[(T1, T2, T3, T4, T5, T6)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple7W[T1, T2, T3, T4, T5, T6, T7](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7]): Writes[(T1, T2, T3, T4, T5, T6, T7)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple8W[T1, T2, T3, T4, T5, T6, T7, T8](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8)]
- Definition Classes
- GeneratedWrites
- implicit def Tuple9W[T1, T2, T3, T4, T5, T6, T7, T8, T9](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3], arg3: Writes[T4], arg4: Writes[T5], arg5: Writes[T6], arg6: Writes[T7], arg7: Writes[T8], arg8: Writes[T9]): Writes[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]
- Definition Classes
- GeneratedWrites
- implicit val ZoneIdWrites: Writes[ZoneId]
Serializer for
java.time.ZoneId
as JSON string.Serializer for
java.time.ZoneId
as JSON string.- Definition Classes
- EnvWrites
- val ZonedDateTimeEpochMilliWrites: Writes[ZonedDateTime]
Serializer for
java.time.ZonedDateTime
as JSON number.Serializer for
java.time.ZonedDateTime
as JSON number. The number of milliseconds since epoch is used.import java.time.ZonedDateTime import play.api.libs.json.Writes implicit val zdtnWrites = Writes.ZonedDateTimeEpochMilliWrites
- Definition Classes
- EnvWrites
- def apply[A](f: (A) => JsValue): Writes[A]
Returns an instance which uses
f
as Writes.writes function. - implicit def arrayWrites[T](implicit arg0: ClassTag[T], arg1: Writes[T]): Writes[Array[T]]
Serializer for Array[T] types.
Serializer for Array[T] types.
- Definition Classes
- DefaultWrites
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def at[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[A]
- Definition Classes
- PathWrites
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val constraints: ConstraintWrites
- implicit val contravariantfunctorWrites: ContravariantFunctor[Writes]
- def dateWrites(pattern: String): Writes[Date]
Serializer for java.util.Date
Serializer for java.util.Date
- pattern
the pattern used by SimpleDateFormat
- Definition Classes
- DefaultWrites
- implicit def defaultDateWrites[T <: Date]: Writes[T]
Default Serializer java.util.Date -> JsNumber(d.getTime (nb of ms))
Default Serializer java.util.Date -> JsNumber(d.getTime (nb of ms))
- Definition Classes
- DefaultWrites
- implicit def enumNameWrites[E <: Enumeration]: Writes[EnumerationWrites.enumNameWrites.E.Value]
Serializer for scala.Enumeration by name.
Serializer for scala.Enumeration by name.
- Definition Classes
- EnumerationWrites
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def genericMapWrites[V, M[A, B] <: Map[A, B]](implicit w: Writes[V]): OWrites[M[String, V]]
Serializer for Map[String,V] types.
Serializer for Map[String,V] types.
- Definition Classes
- DefaultWrites
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def iterableWrites2[A, I](implicit ev: <:<[I, Iterable[A]], w: Writes[A]): Writes[I]
Serializer for Iterable types.
Serializer for Iterable types.
- Definition Classes
- LowPriorityWrites
- val javaDurationMillisWrites: Writes[Duration]
Serializer of Java Duration as a number of milliseconds.
Serializer of Java Duration as a number of milliseconds.
- Definition Classes
- EnvWrites
- implicit val javaDurationWrites: Writes[Duration]
Serializer of Java Duration using ISO representation (e.g.
Serializer of Java Duration using ISO representation (e.g. PT1S for 1 second).
- Definition Classes
- EnvWrites
- implicit val javaPeriodWrites: Writes[Period]
Serializer of Java Period using ISO representation (e.g.
Serializer of Java Period using ISO representation (e.g. P2D for 2 days).
- Definition Classes
- EnvWrites
- def jsPick(path: JsPath): Writes[JsValue]
- Definition Classes
- PathWrites
- def jsPickBranch(path: JsPath): OWrites[JsValue]
- Definition Classes
- PathWrites
- def jsPickBranchUpdate(path: JsPath, wrs: OWrites[JsValue]): OWrites[JsValue]
- Definition Classes
- PathWrites
- implicit def jsValueWrites[T <: JsValue]: Writes[T]
Serializer for JsValues.
Serializer for JsValues.
- Definition Classes
- DefaultWrites
- implicit def jsonNodeWrites[T <: JsonNode]: Writes[T]
Serializer for Jackson JsonNode
Serializer for Jackson JsonNode
- Definition Classes
- EnvWrites
- implicit def keyMapWrites[K, V, M[K, V] <: Map[K, V]](implicit arg0: KeyWrites[K], arg1: Writes[V]): OWrites[M[K, V]]
- Definition Classes
- DefaultWrites
- def list[A](implicit writes: Writes[A]): Writes[List[A]]
- Definition Classes
- ConstraintWrites
- val localeObjectWrites: OWrites[Locale]
Serializer for a
Locale
using a object representationSerializer for a
Locale
using a object representation- Definition Classes
- EnvWrites
- implicit val localeWrites: Writes[Locale]
Serializer for a
Locale
using the IETF BCP 47 string representationSerializer for a
Locale
using the IETF BCP 47 string representation- Definition Classes
- EnvWrites
- def map[A](implicit writes: Writes[A]): OWrites[Map[String, A]]
- Definition Classes
- ConstraintWrites
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- 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.
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]
- Definition Classes
- PathWrites
- def of[A](implicit w: Writes[A]): Writes[A]
- Definition Classes
- ConstraintWrites
- def optionWithNull[A](implicit wa: Writes[A]): Writes[Option[A]]
Pure Option Writer[T] which writes "null" when None which is different from
JsPath.writeNullable
which omits the field when NonePure Option Writer[T] which writes "null" when None which is different from
JsPath.writeNullable
which omits the field when None- Definition Classes
- ConstraintWrites
- val path: PathWrites
- def pruned[A]: Writes[A]
- Definition Classes
- ConstraintWrites
- def pure[A](fixed: => A)(implicit wrs: Writes[A]): Writes[JsValue]
- Definition Classes
- ConstraintWrites
- def pure[A](path: JsPath, fixed: => A)(implicit wrs: Writes[A]): OWrites[JsValue]
- Definition Classes
- PathWrites
- implicit def rangeWrites[T <: Range]: Writes[T]
Serializer for scala.collection.immutable.Range (aka specialized
Seq
ofInt
).Serializer for scala.collection.immutable.Range (aka specialized
Seq
ofInt
).- Definition Classes
- DefaultWrites
- def seq[A](implicit writes: Writes[A]): Writes[Seq[A]]
- Definition Classes
- ConstraintWrites
- def set[A](implicit writes: Writes[A]): Writes[Set[A]]
- Definition Classes
- ConstraintWrites
- implicit def someWrites[T](implicit w: Writes[T]): Writes[Some[T]]
If
Some
is directly used (not asOption
).If
Some
is directly used (not asOption
).import play.api.libs.json.{ Json, Writes } def foo[T: Writes](writeableValue: T) = Json.obj("foo" -> Some(writeableValue)) // equivalent to Json.obj("foo" -> writeableValue)
- Definition Classes
- DefaultWrites
- implicit def stringableWrites[T](implicit conv: (T) => String): Writes[T]
Serializer for any type that is provided an implicit conversion to String (e.g.
Serializer for any type that is provided an implicit conversion to String (e.g. tagged types).
- Definition Classes
- LowPriorityWrites
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def temporalWrites[A <: Temporal, B](formatting: B)(implicit f: (B) => TemporalFormatter[A]): Writes[A]
Serializer for Java8 temporal types (e.g.
Serializer for Java8 temporal types (e.g.
java.time.LocalDateTime
) to be written as JSON string.- A
the Java8 temporal type to be considered: LocalDateTime, ZonedDateTime, Instant
- B
Type of formatting argument
- formatting
an argument to instantiate formatter
import java.time.LocalDateTime import java.time.format.DateTimeFormatter import play.api.libs.json.Writes implicit val w: Writes[LocalDateTime] = Writes.temporalWrites[LocalDateTime, DateTimeFormatter]( DateTimeFormatter.ISO_LOCAL_DATE_TIME)
- Definition Classes
- EnvWrites
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transform[A](w: Writes[A])(f: (A, JsValue) => JsValue): Writes[A]
Transforms the resulting JsValue using the given function, which is also applied with the initial input.
Transforms the resulting JsValue using the given function, which is also applied with the initial input. def transform(transformer: (A, JsValue) => JsValue): Writes[A] = Writes[A] { a => transformer(a, this.writes(a)) }
- w
the initial writer
- f
the transformer function
- implicit val uriWrites: Writes[URI]
Serializer for java.net.URI
Serializer for java.net.URI
- Definition Classes
- LowPriorityWrites
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- object DefaultDateWrites extends Writes[Date]
- Definition Classes
- DefaultWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
defaultDateWrites
- object JsValueWrites extends Writes[JsValue]
- Definition Classes
- DefaultWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
jsValueWrites
- object JsonNodeWrites extends Writes[JsonNode]
- Definition Classes
- EnvWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
jsonNodeWrites
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def iterableWrites[A, M[T] <: Iterable[T]](implicit w: Writes[A]): Writes[M[A]]
Serializer for Iterable types.
Serializer for Iterable types.
Deprecated due to incompatibility with non
_[_]
shapes, #368.- Definition Classes
- LowPriorityWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.1) Use
iterableWrites2
- def mapWrites[V](implicit arg0: Writes[V]): OWrites[Map[String, V]]
Serializer for Map[String,V] types.
Serializer for Map[String,V] types.
- Definition Classes
- DefaultWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
genericMapWrites
- def pruned[A](implicit w: Writes[A]): Writes[A]
- Definition Classes
- ConstraintWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
pruned
withoutWrites[A]
- def sqlDateWrites(pattern: String): Writes[Date]
Serializer for java.sql.Date
Serializer for java.sql.Date
- pattern
the pattern used by SimpleDateFormat
- Definition Classes
- DefaultWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
dateWrites
- def traversableWrites[A](implicit arg0: Writes[A]): Writes[Traversable[A]]
- Definition Classes
- LowPriorityWrites
- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use
iterableWrites