LowPriorityWrites

sealed trait LowPriorityWrites extends EnvWrites
trait EnvWrites
class Object
trait Matchable
class Any
object Writes

Type members

Inherited classlikes

Formatting companion

Formatting companion

Inherited from
EnvWrites
trait TemporalFormatter[T <: Temporal]

Typeclass to implement way of formatting of Java8 temporal types.

Typeclass to implement way of formatting of Java8 temporal types.

Inherited from
EnvWrites

Deprecated and Inherited classlikes

@deprecated("Use `jsonNodeWrites`", "2.8.0")
Deprecated
Inherited from
EnvWrites

Value members

Deprecated methods

@deprecated("Use `iterableWrites2`", "2.8.1")
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.

Deprecated
@deprecated("Use `iterableWrites`", "2.8.0")
def traversableWrites[A](implicit evidence$6: Writes[A]): Writes[Iterable[A]]
Deprecated

Inherited methods

def temporalWrites[A <: Temporal, B](formatting: B)(implicit f: B => TemporalFormatter[A]): Writes[A]

Serializer for Java8 temporal types (e.g. java.time.LocalDateTime) to be written as JSON string.

Serializer for Java8 temporal types (e.g. java.time.LocalDateTime) to be written as JSON string.

Type Params
A

the Java8 temporal type to be considered: LocalDateTime, ZonedDateTime, Instant

B

Type of formatting argument

Value Params
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)
Inherited from
EnvWrites

Inherited fields

Serializer for java.time.Instant as JSON number. The number of milliseconds since epoch is used.

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
Inherited from
EnvWrites

Serializer for java.time.LocalDate as JSON number. The number of milliseconds since epoch is used.

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
Inherited from
EnvWrites

Serializer for java.time.LocalDateTime as JSON number. The number of milliseconds since epoch is used.

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
Inherited from
EnvWrites

Serializer for java.time.LocalTime as JSON number. The nano of day is written.

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
Inherited from
EnvWrites

Serializer for java.time.ZonedDateTime as JSON number. The number of milliseconds since epoch is used.

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
Inherited from
EnvWrites

Serializer of Java Duration as a number of milliseconds.

Serializer of Java Duration as a number of milliseconds.

Inherited from
EnvWrites

Serializer for a Locale using a object representation

Serializer for a Locale using a object representation

Inherited from
EnvWrites

Implicits

Implicits

implicit def iterableWrites2[A, I](implicit ev: I <:< Iterable[A], w: Writes[A]): Writes[I]

Serializer for Iterable types.

Serializer for Iterable types.

implicit def stringableWrites[T](implicit conv: T => String): Writes[T]

Serializer for any type that is provided an implicit conversion to String (e.g. tagged types).

Serializer for any type that is provided an implicit conversion to String (e.g. tagged types).

implicit val uriWrites: Writes[URI]

Serializer for java.net.URI

Serializer for java.net.URI

Inherited implicits

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.

Inherited from
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.

Inherited from
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.

Inherited from
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.

Inherited from
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.

Inherited from
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.

Inherited from
EnvWrites
implicit val ZoneIdWrites: Writes[ZoneId]

Serializer for java.time.ZoneId as JSON string.

Serializer for java.time.ZoneId as JSON string.

Inherited from
EnvWrites
implicit val javaDurationWrites: Writes[Duration]

Serializer of Java Duration using ISO representation (e.g. PT1S for 1 second).

Serializer of Java Duration using ISO representation (e.g. PT1S for 1 second).

Inherited from
EnvWrites
implicit val javaPeriodWrites: Writes[Period]

Serializer of Java Period using ISO representation (e.g. P2D for 2 days).

Serializer of Java Period using ISO representation (e.g. P2D for 2 days).

Inherited from
EnvWrites
implicit def jsonNodeWrites[T <: JsonNode]: Writes[T]

Serializer for Jackson JsonNode

Serializer for Jackson JsonNode

Inherited from
EnvWrites
implicit val localeWrites: Writes[Locale]

Serializer for a Locale using the IETF BCP 47 string representation

Serializer for a Locale using the IETF BCP 47 string representation

Inherited from
EnvWrites