Packages

t

play.api.libs.json

JsReadable

trait JsReadable extends Any

A trait representing a Json node which can be read as an arbitrary type A using a Reads[A]

Source
JsReadable.scala
Linear Supertypes
Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsReadable
  2. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def getClass(): Class[_ <: AnyRef]
    Definition Classes
    Any
  2. abstract def validate[T](implicit rds: Reads[T]): JsResult[T]

    Tries to convert the node into a JsResult[T] (Success or Error).

    Tries to convert the node into a JsResult[T] (Success or Error). An implicit Reads[T] must be defined.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def as[T](implicit fjs: Reads[T]): T

    Tries to convert the node into a T, throwing an exception if it can't.

    Tries to convert the node into a T, throwing an exception if it can't. An implicit Reads[T] must be defined.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def asOpt[T](implicit fjs: Reads[T]): Option[T]

    Tries to convert the node into a T.

    Tries to convert the node into a T. An implicit Reads[T] must be defined. Any error is mapped to None

    returns

    Some[T] if it succeeds, None if it fails.

  7. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  8. def hashCode(): Int
    Definition Classes
    Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def toString(): String
    Definition Classes
    Any
  11. def transform[A <: JsValue](rds: Reads[A]): JsResult[A]

    Transforms this node into a JsResult using provided Json transformer Reads[JsValue]

Inherited from Any

Ungrouped