RW

object RW extends CompileRW
Companion:
class
Source:
RW.scala
trait CompileRW
class Object
trait Matchable
class Any
RW.type

Value members

Concrete methods

def enumeration[T](list: List[T], asString: T => String, caseSensitive: Boolean): RW[T]
Source:
RW.scala
def enumeration[T](fieldName: String, mapping: (String, T)*): RW[T]

Convenience functionality for working with enumerations

Convenience functionality for working with enumerations

Value parameters:
fieldName

the field name to refer to in the Json

mapping

a mapping of key/value pairs representing the String in fieldName to the representative value

Source:
RW.scala
def from[T](r: T => Json, w: Json => T): RW[T]
Source:
RW.scala
def poly[P](fieldName: String, getType: P => String)(matcher: PartialFunction[String, RW[_ <: P]]): RW[P]

Convenience functionality for working with polymorphic types

Convenience functionality for working with polymorphic types

Value parameters:
fieldName

the field name stored in the value (defaults to "type")

getType

a function to determine the field value from an instance (defaults to the class name with the first character lowercase - defaultGetType)

matcher

a matcher for field values to get the representative RW for that type

Source:
RW.scala
def static[T](value: T): RW[T]

Convenience functionality to provide a static / singleton value that represents that type

Convenience functionality to provide a static / singleton value that represents that type

Value parameters:
value

the singleton value to use

Source:
RW.scala
def string[T](asString: T => String, fromString: String => T): RW[T]
Source:
RW.scala

Inherited methods

inline def fromMap[T <: Product](map: ListMap[String, Json])(using p: ProductOf[T]): T
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def fromMapElems[A <: Product, T <: Tuple, L <: Tuple](map: ListMap[String, Json], index: Int, arr: Array[Any], defaults: Map[String, Any]): Unit
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def gen[T <: Product](using ProductOf[T]): RW[T]
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def genR[T <: Product](using ProductOf[T]): Reader[T]
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def genW[T <: Product](using ProductOf[T]): Writer[T]
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def getClassName[T]: String
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def getDefaultParams[T]: Map[String, AnyRef]
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def toMap[T <: Product](t: T)(using p: ProductOf[T]): ListMap[String, Json]
Inherited from:
CompileRW
Source:
CompileRW.scala
inline def toMapElems[A <: Product, T <: Tuple, L <: Tuple](a: A, index: Int): ListMap[String, Json]
Inherited from:
CompileRW
Source:
CompileRW.scala

Implicits

Implicits

implicit lazy val bigDecimalRW: RW[BigDecimal]
Source:
RW.scala
implicit lazy val bigIntRW: RW[BigInt]
Source:
RW.scala
implicit lazy val boolRW: RW[Boolean]
Source:
RW.scala
implicit lazy val byteRW: RW[Byte]
Source:
RW.scala
implicit lazy val doubleRW: RW[Double]
Source:
RW.scala
implicit lazy val floatRW: RW[Float]
Source:
RW.scala
implicit lazy val intRW: RW[Int]
Source:
RW.scala
implicit def listRW[V : RW]: RW[List[V]]
Source:
RW.scala
implicit lazy val longRW: RW[Long]
Source:
RW.scala
implicit def mapRW[V : RW]: RW[Map[String, V]]
Source:
RW.scala
implicit lazy val objRW: RW[Obj]
Source:
RW.scala
implicit def optionRW[V : RW]: RW[Option[V]]
Source:
RW.scala
implicit def setRW[V : RW]: RW[Set[V]]
Source:
RW.scala
implicit lazy val shortRW: RW[Short]
Source:
RW.scala
implicit lazy val stringRW: RW[String]
Source:
RW.scala
implicit lazy val unitRW: RW[Unit]
Source:
RW.scala
implicit lazy val valueRW: RW[Json]
Source:
RW.scala
implicit def vectorRW[V : RW]: RW[Vector[V]]
Source:
RW.scala