JsValueMapper

wjson.JsValueMapper$
See theJsValueMapper companion trait

Best Practice for Case Class Json Mapping:

  1. make the case class derives JsValueMapper.
  2. or declare a given JsValueMaper[T] for the case class

otherwise, every time you use API which using a JsValueMapper[T], a new JsValueMapper[T] will be created via the JsValueMapper.given_JsValueMapper_T macro. this is an expensive operation, every macro expansion will generate an anonumous implementation class. so, there will be a lot of classes in the compilation and increase the compile time, the output jar file will be large.

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

trait Container[C[_]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object given_Container_List extends Container[List]

Attributes

Graph
Supertypes
trait Container[List]
class Object
trait Matchable
class Any
Self type
object given_Container_Seq extends Container[Seq]

Attributes

Graph
Supertypes
trait Container[Seq]
class Object
trait Matchable
class Any
Self type
object given_Container_Set extends Container[Set]

Attributes

Graph
Supertypes
trait Container[Set]
class Object
trait Matchable
class Any
Self type
object given_Container_Vector extends Container[Vector]

Attributes

Graph
Supertypes
trait Container[Vector]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[BigDecimal]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[BigInt]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[BigInteger]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Boolean]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Byte]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Double]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Float]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Int]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Long]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[Short]
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
trait JsValueMapper[String]
class Object
trait Matchable
class Any
Self type
object jmBigDecimal extends JsValueMapper[BigDecimal]

Attributes

Graph
Supertypes
trait JsValueMapper[BigDecimal]
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

inline def caseFieldGet[T : JsValueMapper](js: JsObject, name: String): T
inline def caseFieldGet[T : JsValueMapper](js: JsObject, name: String, default: T): T
inline def derived[T](using Of[T]): JsValueMapper[T]

Givens

Givens

given given_JsValueMapper_Array[T : ClassTag]: given_JsValueMapper_Array[T]
given given_JsValueMapper_C[T : JsValueMapper, C[_] : Container]: given_JsValueMapper_C[T, C]
given given_JsValueMapper_Map[T : JsValueMapper]: given_JsValueMapper_Map[T]
given given_JsValueMapper_Option[T : JsValueMapper]: given_JsValueMapper_Option[T]
given given_JsValueMapper_SortedMap[T : JsValueMapper]: given_JsValueMapper_SortedMap[T]
given given_JsValueMapper_SortedSet[T : Ordering]: given_JsValueMapper_SortedSet[T]
inline given given_JsValueMapper_T[T](using Of[T]): JsValueMapper[T]

the T.derived has high priority than JsValMapper.given so if you define the derives, this macro will not be used.

the T.derived has high priority than JsValMapper.given so if you define the derives, this macro will not be used.

Attributes