Typeclass to implement way of formatting of Java8 temporal types.
Serializer for BigDecimal types.
Serializer for Boolean types.
Serializer for Byte types.
Default Serializer java.util.Date -> JsNumber(d.getTime (nb of ms))
The default typeclass to write a java.time.Instant
,
using '2011-12-03T10:15:30Z' format.
Default Serializer org.joda.time.DateTime -> JsNumber(d.getMillis (nb of ms))
Default Serializer org.joda.time.LocalDate -> JsString(ISO8601 format (yyyy-MM-dd))
Default Serializer org.joda.time.LocalDate -> JsString(ISO8601 format (HH:mm:ss.SSS))
The default typeclass to write a java.time.LocalDateTime
,
using '2011-12-03T10:15:30' format.
The default typeclass to write a java.time.LocalDate
,
using '2011-12-03' format.
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.ZonedDateTime
,
using '2011-12-03T10:15:30+01:00[Europe/Paris]' format.
Serializer for Double types.
Serializer for Float types.
Serializer for java.time.Instant
as JSON number.
Serializer for java.time.Instant
as JSON number.
import java.time.Instant import play.api.libs.json.Writes implicit val inWrites = Writes.InstantNumberWrites
Serializer for Int types.
Serializer for JsValues.
Serializer for Jackson JsonNode
Serializer for java.time.LocalDate
as JSON number.
Serializer for java.time.LocalDate
as JSON number.
import java.time.LocalDate import play.api.libs.json.Writes implicit val ldnWrites = Writes.LocalDateNumberWrites
Serializer for java.time.LocalDateTime
as JSON number.
Serializer for java.time.LocalDateTime
as JSON number.
import java.time.LocalDateTime import play.api.libs.json.Writes implicit val ldtnWrites = Writes.LocalDateTimeNumberWrites
Serializer for Long types.
Serializer for Option.
Serializer for Short types.
Serializer for String types.
Formatting companion
Serializer for java.util.UUID
Serializer for java.time.ZonedDateTime
as JSON number.
Serializer for java.time.ZonedDateTime
as JSON number.
import java.time.ZonedDateTime import play.api.libs.json.Writes implicit val zdtnWrites = Writes.ZonedDateTimeNumberWrites
Serializer for Array[T] types.
Serializer for java.util.Date
Serializer for java.util.Date
the pattern used by SimpleDateFormat
Serializer for scala.Enumeration by name.
Serializer for org.joda.time.DateTime
Serializer for org.joda.time.DateTime
the pattern used by SimpleDateFormat
Serializer for org.joda.time.LocalDate
Serializer for org.joda.time.LocalDate
the pattern used by org.joda.time.format.DateTimeFormat
Serializer for org.joda.time.LocalTime
Serializer for org.joda.time.LocalTime
the pattern used by org.joda.time.format.DateTimeFormat
Serializer for Map[String,V] types.
Serializer for java.sql.Date
Serializer for java.sql.Date
the pattern used by SimpleDateFormat
Serializer for Java8 temporal types (e.g.
Serializer for Java8 temporal types (e.g. java.time.LocalDateTime
)
to be written as JSON string.
the Java8 temporal type to be considered: LocalDateTime, ZonedDateTime, Instant
Type of formatting argument
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)
Serializer for Traversables types.
Default Serializers.