Object/Trait

play.api.libs.json

Writes

Related Docs: trait Writes | package json

Permalink

object Writes extends PathWrites with ConstraintWrites with DefaultWrites with GeneratedWrites

Default Serializers.

Source
Writes.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Writes
  2. GeneratedWrites
  3. DefaultWrites
  4. LowPriorityWrites
  5. EnvWrites
  6. ConstraintWrites
  7. PathWrites
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait TemporalFormatter[T <: Temporal] extends AnyRef

    Permalink

    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

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. implicit object BigDecimalWrites extends Writes[BigDecimal]

    Permalink

    Serializer for BigDecimal types.

    Serializer for BigDecimal types.

    Definition Classes
    DefaultWrites
  5. implicit object BooleanWrites extends Writes[Boolean]

    Permalink

    Serializer for Boolean types.

    Serializer for Boolean types.

    Definition Classes
    DefaultWrites
  6. implicit object ByteWrites extends Writes[Byte]

    Permalink

    Serializer for Byte types.

    Serializer for Byte types.

    Definition Classes
    DefaultWrites
  7. implicit object DefaultDateWrites extends Writes[Date]

    Permalink

    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
  8. implicit val DefaultInstantWrites: Writes[Instant]

    Permalink

    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
  9. implicit val DefaultLocalDateTimeWrites: Writes[LocalDateTime]

    Permalink

    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
  10. implicit val DefaultLocalDateWrites: Writes[LocalDate]

    Permalink

    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
  11. implicit val DefaultLocalTimeWrites: Writes[LocalTime]

    Permalink

    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
  12. implicit val DefaultOffsetDateTimeWrites: Writes[OffsetDateTime]

    Permalink

    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
  13. implicit val DefaultZonedDateTimeWrites: Writes[ZonedDateTime]

    Permalink

    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
  14. implicit object DoubleWrites extends Writes[Double]

    Permalink

    Serializer for Double types.

    Serializer for Double types.

    Definition Classes
    DefaultWrites
  15. implicit object FloatWrites extends Writes[Float]

    Permalink

    Serializer for Float types.

    Serializer for Float types.

    Definition Classes
    DefaultWrites
  16. val InstantEpochMilliWrites: Writes[Instant]

    Permalink

    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.InstantNumberWrites
    Definition Classes
    EnvWrites
  17. implicit object IntWrites extends Writes[Int]

    Permalink

    Serializer for Int types.

    Serializer for Int types.

    Definition Classes
    DefaultWrites
  18. implicit object JsValueWrites extends Writes[JsValue]

    Permalink

    Serializer for JsValues.

    Serializer for JsValues.

    Definition Classes
    DefaultWrites
  19. implicit object JsonNodeWrites extends Writes[JsonNode]

    Permalink

    Serializer for Jackson JsonNode

    Serializer for Jackson JsonNode

    Definition Classes
    EnvWrites
  20. val LocalDateEpochMilliWrites: Writes[LocalDate]

    Permalink

    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.LocalDateEpochMilliWrites
    Definition Classes
    EnvWrites
  21. val LocalDateTimeEpochMilliWrites: Writes[LocalDateTime]

    Permalink

    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
  22. val LocalTimeNanoOfDayWrites: Writes[LocalTime]

    Permalink

    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.LocalTimeNumberWrites
    Definition Classes
    EnvWrites
  23. implicit object LongWrites extends Writes[Long]

    Permalink

    Serializer for Long types.

    Serializer for Long types.

    Definition Classes
    DefaultWrites
  24. implicit def OptionWrites[T](implicit fmt: Writes[T]): Writes[Option[T]]

    Permalink

    Serializer for Option.

    Serializer for Option.

    Definition Classes
    DefaultWrites
  25. implicit object ShortWrites extends Writes[Short]

    Permalink

    Serializer for Short types.

    Serializer for Short types.

    Definition Classes
    DefaultWrites
  26. implicit object StringWrites extends Writes[String]

    Permalink

    Serializer for String types.

    Serializer for String types.

    Definition Classes
    DefaultWrites
  27. object TemporalFormatter

    Permalink

    Formatting companion

    Formatting companion

    Definition Classes
    EnvWrites
  28. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  29. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  30. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  31. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  32. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  33. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  34. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  35. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  36. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  37. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  38. implicit def Tuple1W[T1](implicit arg0: Writes[T1]): Writes[(T1)]

    Permalink
    Definition Classes
    GeneratedWrites
  39. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  40. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  41. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  42. implicit def Tuple2W[T1, T2](implicit arg0: Writes[T1], arg1: Writes[T2]): Writes[(T1, T2)]

    Permalink
    Definition Classes
    GeneratedWrites
  43. implicit def Tuple3W[T1, T2, T3](implicit arg0: Writes[T1], arg1: Writes[T2], arg2: Writes[T3]): Writes[(T1, T2, T3)]

    Permalink
    Definition Classes
    GeneratedWrites
  44. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  45. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  46. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  47. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  48. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  49. 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)]

    Permalink
    Definition Classes
    GeneratedWrites
  50. implicit object UuidWrites extends Writes[UUID]

    Permalink

    Serializer for java.util.UUID

    Serializer for java.util.UUID

    Definition Classes
    DefaultWrites
  51. implicit val ZoneIdWrites: Writes[ZoneId]

    Permalink

    Serializer for java.time.ZoneId as JSON string.

    Serializer for java.time.ZoneId as JSON string.

    Definition Classes
    EnvWrites
  52. val ZonedDateTimeEpochMilliWrites: Writes[ZonedDateTime]

    Permalink

    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
  53. def apply[A](f: (A) ⇒ JsValue): Writes[A]

    Permalink
  54. implicit def arrayWrites[T](implicit arg0: ClassTag[T], arg1: Writes[T]): Writes[Array[T]]

    Permalink

    Serializer for Array[T] types.

    Serializer for Array[T] types.

    Definition Classes
    DefaultWrites
  55. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  56. def at[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[A]

    Permalink
    Definition Classes
    PathWrites
  57. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. val constraints: ConstraintWrites

    Permalink
  59. implicit val contravariantfunctorWrites: ContravariantFunctor[Writes]

    Permalink
  60. def dateWrites(pattern: String): Writes[Date]

    Permalink

    Serializer for java.util.Date

    Serializer for java.util.Date

    pattern

    the pattern used by SimpleDateFormat

    Definition Classes
    DefaultWrites
  61. implicit def enumNameWrites[E <: Enumeration]: Writes[DefaultWrites.enumNameWrites.E.Value]

    Permalink

    Serializer for scala.Enumeration by name.

    Serializer for scala.Enumeration by name.

    Definition Classes
    DefaultWrites
  62. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  63. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  64. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  65. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  66. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  67. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  68. val javaDurationMillisWrites: Writes[Duration]

    Permalink

    Serializer of Java Duration as a number of milliseconds.

    Serializer of Java Duration as a number of milliseconds.

    Definition Classes
    EnvWrites
  69. implicit val javaDurationWrites: Writes[Duration]

    Permalink

    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
  70. implicit val javaPeriodWrites: Writes[Period]

    Permalink

    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
  71. def jsPick(path: JsPath): Writes[JsValue]

    Permalink
    Definition Classes
    PathWrites
  72. def jsPickBranch(path: JsPath): OWrites[JsValue]

    Permalink
    Definition Classes
    PathWrites
  73. def jsPickBranchUpdate(path: JsPath, wrs: OWrites[JsValue]): OWrites[JsValue]

    Permalink
    Definition Classes
    PathWrites
  74. def list[A](implicit writes: Writes[A]): Writes[List[A]]

    Permalink
    Definition Classes
    ConstraintWrites
  75. val localeObjectWrites: OWrites[Locale]

    Permalink

    Serializer for a Locale using a object representation

    Serializer for a Locale using a object representation

    Definition Classes
    EnvWrites
  76. implicit val localeWrites: Writes[Locale]

    Permalink

    Serializer for a Locale using the IETF BCP 47 string representation

    Serializer for a Locale using the IETF BCP 47 string representation

    Definition Classes
    EnvWrites
  77. def map[A](implicit writes: Writes[A]): OWrites[Map[String, A]]

    Permalink
    Definition Classes
    ConstraintWrites
  78. implicit def mapWrites[V](implicit arg0: Writes[V]): OWrites[Map[String, V]]

    Permalink

    Serializer for Map[String,V] types.

    Serializer for Map[String,V] types.

    Definition Classes
    DefaultWrites
  79. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  80. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  81. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  82. def nullable[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[Option[A]]

    Permalink

    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
  83. def of[A](implicit w: Writes[A]): Writes[A]

    Permalink
    Definition Classes
    ConstraintWrites
  84. def optionWithNull[A](implicit wa: Writes[A]): Writes[Option[A]]

    Permalink

    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

    Definition Classes
    ConstraintWrites
  85. val path: PathWrites

    Permalink
  86. def pruned[A](implicit w: Writes[A]): Writes[A]

    Permalink
    Definition Classes
    ConstraintWrites
  87. def pure[A](fixed: ⇒ A)(implicit wrs: Writes[A]): Writes[JsValue]

    Permalink
    Definition Classes
    ConstraintWrites
  88. def pure[A](path: JsPath, fixed: ⇒ A)(implicit wrs: Writes[A]): OWrites[JsValue]

    Permalink
    Definition Classes
    PathWrites
  89. def seq[A](implicit writes: Writes[A]): Writes[Seq[A]]

    Permalink
    Definition Classes
    ConstraintWrites
  90. def set[A](implicit writes: Writes[A]): Writes[Set[A]]

    Permalink
    Definition Classes
    ConstraintWrites
  91. def sqlDateWrites(pattern: String): Writes[Date]

    Permalink

    Serializer for java.sql.Date

    Serializer for java.sql.Date

    pattern

    the pattern used by SimpleDateFormat

    Definition Classes
    DefaultWrites
  92. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  93. def temporalWrites[A <: Temporal, B](formatting: B)(implicit f: (B) ⇒ TemporalFormatter[A]): Writes[A]

    Permalink

    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 play.api.libs.json.Writes
    implicit val temporalWrites: Writes[LocalDateTime] =
      temporalWrites[LocalDateTime, DateTimeFormatter](
        DateTimeFormatter.ISO_LOCAL_DATE_TIME)
    Definition Classes
    EnvWrites
  94. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  95. def transform[A](w: Writes[A])(f: (A, JsValue) ⇒ JsValue): Writes[A]

    Permalink

    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

  96. implicit def traversableWrites[A](implicit arg0: Writes[A]): Writes[Traversable[A]]

    Permalink

    Serializer for Traversables types.

    Serializer for Traversables types.

    Definition Classes
    LowPriorityWrites
  97. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  99. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. object DefaultJodaDateWrites extends Writes[DateTime]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.JodaDateNumberWrites

  2. object DefaultJodaLocalDateWrites extends Writes[LocalDate]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.DefaultJodaLocalDateWrites

  3. object DefaultJodaLocalTimeWrites extends Writes[LocalTime]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.DefaultJodaLocalTimeWrites

  4. def jodaDateWrites(pattern: String): Writes[DateTime]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.jodaDateWrites

  5. def jodaLocalDateWrites(pattern: String): Writes[LocalDate]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.jodaLocalDateWrites

  6. def jodaLocalTimeWrites(pattern: String): Writes[LocalTime]

    Permalink
    Definition Classes
    EnvWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Include play-json-joda as a dependency and use JodaWrites.jodaLocalTimeWrites

Inherited from GeneratedWrites

Inherited from DefaultWrites

Inherited from LowPriorityWrites

Inherited from EnvWrites

Inherited from ConstraintWrites

Inherited from PathWrites

Inherited from AnyRef

Inherited from Any

Ungrouped