Trait

play.api.libs.json

DefaultWrites

Related Doc: package json

Permalink

trait DefaultWrites extends AnyRef

Default Serializers.

Source
Writes.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultWrites
  2. AnyRef
  3. 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.

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.

  5. implicit object BooleanWrites extends Writes[Boolean]

    Permalink

    Serializer for Boolean types.

  6. implicit object ByteWrites extends Writes[Byte]

    Permalink

    Serializer for Byte types.

  7. implicit object DefaultDateWrites extends Writes[Date]

    Permalink

    Default Serializer java.util.Date -> JsNumber(d.getTime (nb of ms))

  8. implicit val DefaultInstantWrites: Writes[Instant]

    Permalink

    The default typeclass to write a java.time.Instant, using '2011-12-03T10:15:30Z' format.

  9. implicit object DefaultJodaDateWrites extends Writes[DateTime]

    Permalink

    Default Serializer org.joda.time.DateTime -> JsNumber(d.getMillis (nb of ms))

  10. implicit object DefaultJodaLocalDateWrites extends Writes[LocalDate]

    Permalink

    Default Serializer org.joda.time.LocalDate -> JsString(ISO8601 format (yyyy-MM-dd))

  11. implicit object DefaultJodaLocalTimeWrites extends Writes[LocalTime]

    Permalink

    Default Serializer org.joda.time.LocalDate -> JsString(ISO8601 format (HH:mm:ss.SSS))

  12. implicit val DefaultLocalDateTimeWrites: Writes[LocalDateTime]

    Permalink

    The default typeclass to write a java.time.LocalDateTime, using '2011-12-03T10:15:30' format.

  13. implicit val DefaultLocalDateWrites: Writes[LocalDate]

    Permalink

    The default typeclass to write a java.time.LocalDate, using '2011-12-03' format.

  14. implicit val DefaultOffsetDateTimeWrites: Writes[OffsetDateTime]

    Permalink

    The default typeclass to write a java.time.OffsetDateTime, using '2011-12-03T10:15:30+02:00' format.

  15. 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.

  16. implicit object DoubleWrites extends Writes[Double]

    Permalink

    Serializer for Double types.

  17. implicit object FloatWrites extends Writes[Float]

    Permalink

    Serializer for Float types.

  18. val InstantNumberWrites: Writes[Instant]

    Permalink

    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
  19. implicit object IntWrites extends Writes[Int]

    Permalink

    Serializer for Int types.

  20. implicit object JsValueWrites extends Writes[JsValue]

    Permalink

    Serializer for JsValues.

  21. implicit object JsonNodeWrites extends Writes[JsonNode]

    Permalink

    Serializer for Jackson JsonNode

  22. val LocalDateNumberWrites: Writes[LocalDate]

    Permalink

    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
  23. val LocalDateTimeNumberWrites: Writes[LocalDateTime]

    Permalink

    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
  24. implicit object LongWrites extends Writes[Long]

    Permalink

    Serializer for Long types.

  25. implicit def OptionWrites[T](implicit fmt: Writes[T]): Writes[Option[T]]

    Permalink

    Serializer for Option.

  26. implicit object ShortWrites extends Writes[Short]

    Permalink

    Serializer for Short types.

  27. implicit object StringWrites extends Writes[String]

    Permalink

    Serializer for String types.

  28. object TemporalFormatter

    Permalink

    Formatting companion

  29. implicit object UuidWrites extends Writes[UUID]

    Permalink

    Serializer for java.util.UUID

  30. val ZonedDateTimeNumberWrites: Writes[ZonedDateTime]

    Permalink

    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
  31. implicit def arrayWrites[T](implicit arg0: ClassTag[T], arg1: Writes[T]): Writes[Array[T]]

    Permalink

    Serializer for Array[T] types.

  32. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  33. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def dateWrites(pattern: String): Writes[Date]

    Permalink

    Serializer for java.util.Date

    Serializer for java.util.Date

    pattern

    the pattern used by SimpleDateFormat

  35. implicit def enumNameWrites[E <: Enumeration]: Writes[enumNameWrites.E.Value]

    Permalink

    Serializer for scala.Enumeration by name.

  36. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  42. def jodaDateWrites(pattern: String): Writes[DateTime]

    Permalink

    Serializer for org.joda.time.DateTime

    Serializer for org.joda.time.DateTime

    pattern

    the pattern used by SimpleDateFormat

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

    Permalink

    Serializer for org.joda.time.LocalDate

    Serializer for org.joda.time.LocalDate

    pattern

    the pattern used by org.joda.time.format.DateTimeFormat

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

    Permalink

    Serializer for org.joda.time.LocalTime

    Serializer for org.joda.time.LocalTime

    pattern

    the pattern used by org.joda.time.format.DateTimeFormat

  45. implicit def mapWrites[V](implicit arg0: Writes[V]): OWrites[Map[String, V]]

    Permalink

    Serializer for Map[String,V] types.

  46. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  49. def sqlDateWrites(pattern: String): Writes[Date]

    Permalink

    Serializer for java.sql.Date

    Serializer for java.sql.Date

    pattern

    the pattern used by SimpleDateFormat

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  51. 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)
  52. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  53. implicit def traversableWrites[A](implicit arg0: Writes[A]): Writes[Traversable[A]]

    Permalink

    Serializer for Traversables types.

  54. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped