DefaultReads

play.api.libs.json.DefaultReads

Default deserializer type classes.

Attributes

Graph
Supertypes
trait EnvReads
class Object
trait Matchable
class Any
Known subtypes
object Reads.type

Members list

Type members

Classlikes

object BigIntReads extends Reads[BigInt]

Deserializer for BigInt

Deserializer for BigInt

Attributes

Supertypes
trait Reads[BigInt]
class Object
trait Matchable
class Any
Self type
object BigIntegerReads extends Reads[BigInteger]

Deserializer for BigInteger

Deserializer for BigInteger

Attributes

Supertypes
trait Reads[BigInteger]
class Object
trait Matchable
class Any
Self type
object BooleanReads extends Reads[Boolean]

Deserializer for Boolean types.

Deserializer for Boolean types.

Attributes

Supertypes
trait Reads[Boolean]
class Object
trait Matchable
class Any
Self type
object ByteReads extends Reads[Byte]

Deserializer for Byte types.

Deserializer for Byte types.

Attributes

Supertypes
trait Reads[Byte]
class Object
trait Matchable
class Any
Self type
ByteReads.type
object DoubleReads extends Reads[Double]

Deserializer for Double types.

Deserializer for Double types.

Attributes

Supertypes
trait Reads[Double]
class Object
trait Matchable
class Any
Self type
object FloatReads extends Reads[Float]

Deserializer for Float types.

Deserializer for Float types.

Attributes

Supertypes
trait Reads[Float]
class Object
trait Matchable
class Any
Self type
FloatReads.type
object IntReads extends Reads[Int]

Deserializer for Int types.

Deserializer for Int types.

Attributes

Supertypes
trait Reads[Int]
class Object
trait Matchable
class Any
Self type
IntReads.type
object JsArrayReads extends Reads[JsArray]

Deserializer for JsArray.

Deserializer for JsArray.

Attributes

Supertypes
trait Reads[JsArray]
class Object
trait Matchable
class Any
Self type
object JsBooleanReads extends Reads[JsBoolean]

Deserializer for JsBoolean.

Deserializer for JsBoolean.

Attributes

Supertypes
trait Reads[JsBoolean]
class Object
trait Matchable
class Any
Self type
object JsNumberReads extends Reads[JsNumber]

Deserializer for JsNumber.

Deserializer for JsNumber.

Attributes

Supertypes
trait Reads[JsNumber]
class Object
trait Matchable
class Any
Self type
object JsObjectReads extends Reads[JsObject]

Deserializer for JsObject.

Deserializer for JsObject.

Attributes

Supertypes
trait Reads[JsObject]
class Object
trait Matchable
class Any
Self type
object JsStringReads extends Reads[JsString]

Deserializer for JsString.

Deserializer for JsString.

Attributes

Supertypes
trait Reads[JsString]
class Object
trait Matchable
class Any
Self type
object JsValueReads extends Reads[JsValue]

Deserializer for JsValue.

Deserializer for JsValue.

Attributes

Supertypes
trait Reads[JsValue]
class Object
trait Matchable
class Any
Self type
object LongReads extends Reads[Long]

Deserializer for Long types.

Deserializer for Long types.

Attributes

Supertypes
trait Reads[Long]
class Object
trait Matchable
class Any
Self type
LongReads.type
object ShortReads extends Reads[Short]

Deserializer for Short types.

Deserializer for Short types.

Attributes

Supertypes
trait Reads[Short]
class Object
trait Matchable
class Any
Self type
ShortReads.type
object StringReads extends Reads[String]

Deserializer for String types.

Deserializer for String types.

Attributes

Supertypes
trait Reads[String]
class Object
trait Matchable
class Any
Self type
class UUIDReader(checkValidity: Boolean) extends Reads[UUID]

Deserializer for java.util.UUID

Deserializer for java.util.UUID

Attributes

Supertypes
trait Reads[UUID]
class Object
trait Matchable
class Any

Value members

Concrete methods

def JsErrorObj(knownValue: JsValue, key: String, args: JsValue*): JsObject

builds a JsErrorObj JsObject { VAL : "current known erroneous jsvalue", ERR : "the i18n key of the error msg", ARGS : "the args for the error msg" (JsArray) }

builds a JsErrorObj JsObject { VAL : "current known erroneous jsvalue", ERR : "the i18n key of the error msg", ARGS : "the args for the error msg" (JsArray) }

Attributes

def charMapReads[V](implicit vr: Reads[V]): Reads[Map[Char, V]]

Deserializer for a Map[Char, V]

Deserializer for a Map[Char, V]

Attributes

def enumNameReads[E <: Enumeration](enum: E): Reads[Value]

Reads for scala.Enumeration types using the name.

Reads for scala.Enumeration types using the name.

Value parameters

enum

a scala.Enumeration.

Attributes

def tuple2[A : Reads, B : Reads](name1: String, name2: String): Reads[(A, B)]

Reads a JSON object and constructs a tuple of two values, with custom names for the element fields.

Reads a JSON object and constructs a tuple of two values, with custom names for the element fields.

Type parameters

A

the type for the first element

B

the type for the second element

val tuple2Reads: Reads[(String, Int)] = Reads.tuple2[String, Int]("name", "age")
val tuple2ExampleJson = Json.obj("name" -> "Alice", "age" -> 25)
val tuple2Result: JsResult[(String, Int)] = tuple2Reads.reads(tuple2ExampleJson)
// JsSuccess(("Alice", 25))

Value parameters

name1

the name of the first element _1

name2

the name of the second element _2

Attributes

def tuple3[A : Reads, B : Reads, C : Reads](name1: String, name2: String, name3: String): Reads[(A, B, C)]

Reads a JSON object and constructs a tuple of three values, with custom names for the element fields.

Reads a JSON object and constructs a tuple of three values, with custom names for the element fields.

Type parameters

A

the type for the first element

B

the type for the second element

C

the type for the third element

val tuple3Reads: Reads[(String, Int, Boolean)] =
 Reads.tuple3[String, Int, Boolean]("name", "age", "isStudent")
val tuple3ExampleJson: JsValue =
 Json.obj("name" -> "Alice", "age" -> 25, "isStudent" -> true)
val tuple3Result: JsResult[(String, Int, Boolean)] =
 tuple3Reads.reads(tuple3ExampleJson)
// JsSuccess(("Alice", 25, true))

Value parameters

name1

the name of the first element _1

name2

the name of the second element _2

name3

the name of the third element _3

Attributes

def tuple4[A : Reads, B : Reads, C : Reads, D : Reads](name1: String, name2: String, name3: String, name4: String): Reads[(A, B, C, D)]

Reads a JSON object and constructs a tuple of four values, with custom names for the element fields.

Reads a JSON object and constructs a tuple of four values, with custom names for the element fields.

Type parameters

A

the type for the first element

B

the type for the second element

C

the type for the third element

D

the type for the fourth element

val tuple4Reads: Reads[(String, Int, Boolean, Double)] =
 Reads.tuple4[String, Int, Boolean, Double](
   "name", "age", "isStudent", "score")
val tuple4ExampleJson: JsValue = Json.obj(
 "name" -> "Alice", "age" -> 25, "isStudent" -> true, "score" -> 78.9)
val tuple4Result: JsResult[(String, Int, Boolean, Double)] =
 tuple4Reads.reads(tuple4ExampleJson)
 // JsSuccess(("Alice", 25, true, 78.9))

Value parameters

name1

the name of the first element _1

name2

the name of the second element _2

name3

the name of the third element _3

name4

the name of the fourth element _4

Attributes

Inherited methods

protected def parseBigDecimal(input: String): JsResult[BigDecimal]

Attributes

Inherited from:
EnvReads
protected def parseBigInteger(input: String): JsResult[BigInteger]

Attributes

Inherited from:
EnvReads

Implicits

Implicits

implicit def ArrayReads[T : ClassTag]: Reads[Array[T]]

Deserializer for Array[T] types.

Deserializer for Array[T] types.

Attributes

implicit val bigDecReads: Reads[BigDecimal]

Deserializer for BigDecimal

Deserializer for BigDecimal

Attributes

implicit val javaBigDecReads: Reads[BigDecimal]

Deserializer for BigDecimal

Deserializer for BigDecimal

Attributes

implicit def mapReads[K, V](k: String => JsResult[K])(implicit fmtv: Reads[V]): Reads[Map[K, V]]

Deserializer for a Map[K,V]

Deserializer for a Map[K,V]

Attributes

implicit def mapReads[V](implicit fmtv: Reads[V]): Reads[Map[String, V]]

Deserializer for a Map[String,V]

Deserializer for a Map[String,V]

Attributes

implicit val uriReads: Reads[URI]

Deserializer for java.net.URI

Deserializer for java.net.URI

Attributes

implicit val uuidReads: Reads[UUID]

Inherited implicits

implicit def keyMapReads[K : KeyReads, V](implicit evidence$12: KeyReads[K], fmtv: Reads[V]): Reads[Map[K, V]]

Attributes

Inherited from:
LowPriorityDefaultReads
implicit def traversableReads[F[_], A](implicit bf: Factory[A, F[A]], ra: Reads[A]): Reads[F[A]]

Generic deserializer for collections types.

Generic deserializer for collections types.

Attributes

Inherited from:
LowPriorityDefaultReads