play.api.libs.json

Writes

object Writes extends PathWrites with ConstraintWrites with DefaultWrites

Default Serializers.

Source
Writes.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Writes
  2. DefaultWrites
  3. ConstraintWrites
  4. PathWrites
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit object BigDecimalWrites extends Writes[BigDecimal]

    Serializer for BigDecimal types.

  7. implicit object BooleanWrites extends Writes[Boolean]

    Serializer for Boolean types.

  8. implicit object DefaultDateWrites extends Writes[Date]

    Default Serializer java.

  9. implicit object DefaultJodaDateWrites extends Writes[DateTime]

    Default Serializer org.

  10. implicit object DefaultJodaLocalDateWrites extends Writes[LocalDate]

    Default Serializer org.

  11. implicit object DoubleWrites extends Writes[Double]

    Serializer for Double types.

  12. implicit object FloatWrites extends Writes[Float]

    Serializer for Float types.

  13. implicit object IntWrites extends Writes[Int]

    Serializer for Int types.

  14. implicit object JsValueWrites extends Writes[JsValue]

    Serializer for JsValues.

  15. implicit object LongWrites extends Writes[Long]

    Serializer for Long types.

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

    Serializer for Option.

    Serializer for Option.

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

    Serializer for Short types.

  18. implicit object StringWrites extends Writes[String]

    Serializer for String types.

  19. def apply[A](f: (A) ⇒ JsValue): Writes[A]

  20. implicit def arrayWrites[T](implicit arg0: ClassTag[T], fmt: Writes[T]): Writes[Array[T]]

    Serializer for Array[T] types.

    Serializer for Array[T] types.

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

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

    Definition Classes
    PathWrites
  23. def clone(): AnyRef

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

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

    Serializer for java.

    Serializer for java.util.Date

    pattern

    the pattern used by SimpleDateFormat

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

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

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

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

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

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

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

    Serializer for org.

    Serializer for org.joda.time.DateTime

    pattern

    the pattern used by SimpleDateFormat

    Definition Classes
    DefaultWrites
  33. def jodaLocalDateWrites(pattern: String): Writes[LocalDate]

    Serializer for org.

    Serializer for org.joda.time.LocalDate

    pattern

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

    Definition Classes
    DefaultWrites
  34. def jsPick(path: JsPath): Writes[JsValue]

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

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

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

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

    Definition Classes
    ConstraintWrites
  39. implicit def mapWrites[V](implicit fmtv: Writes[V]): OWrites[Map[String, V]]

    Serializer for Map[String,V] types.

    Serializer for Map[String,V] types.

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

    Definition Classes
    AnyRef
  41. final def notify(): Unit

    Definition Classes
    AnyRef
  42. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  43. 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
  44. def of[A](implicit w: Writes[A]): Writes[A]

    Definition Classes
    ConstraintWrites
  45. 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 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
  46. val path: PathWrites

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

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

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

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

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

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

    Serializer for java.

    Serializer for java.sql.Date

    pattern

    the pattern used by SimpleDateFormat

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

    Definition Classes
    AnyRef
  54. def toString(): String

    Definition Classes
    AnyRef → Any
  55. implicit def traversableWrites[A](implicit arg0: Writes[A]): Writes[Traversable[A]] { def writes(as: Traversable[A]): play.api.libs.json.JsArray }

    Serializer for Traversables types.

    Serializer for Traversables types.

    Definition Classes
    DefaultWrites
  56. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def optional[A](path: JsPath)(implicit wrs: Writes[A]): OWrites[Option[A]]

    Definition Classes
    PathWrites
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1-RC2) use nullable[T] instead (in parallel with Reads.nullable(path))

Inherited from DefaultWrites

Inherited from ConstraintWrites

Inherited from PathWrites

Inherited from AnyRef

Inherited from Any

Ungrouped