trait JsMacrosWithOptions[Opts <: MacroOptions] extends JsMacros
- Alphabetic
- By Inheritance
- JsMacrosWithOptions
- JsMacros
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- macro def format[A]: OFormat[A]
Creates a
OFormat[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.Creates a
OFormat[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.$macroWarning
$macroTypeParam
import play.api.libs.functional.syntax._ import play.api.libs.json.{ Json, JsonConfiguration, __ } case class User(userName: String, age: Int) val userFormat1 = Json.format[User] // macro-compiler replaces Json.format[User] by injecting into compile chain // the exact code you would write yourself. This is strictly equivalent to: val userFormat2 = ( (__ \ implicitly[JsonConfiguration].naming("userName")).format[String] and (__ \ implicitly[JsonConfiguration].naming("age")).format[Int] )(User.apply, unlift(User.unapply))
- Definition Classes
- JsMacrosWithOptions → JsMacros
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- macro def reads[A]: Reads[A]
Creates a
Reads[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.Creates a
Reads[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.$macroWarning
$macroTypeParam
import play.api.libs.json.{ Json, Reads } case class User(userName: String, age: Int) implicit val userReads: Reads[User] = Json.using[Json.MacroOptions with Json.DefaultValues].reads[User]
- Definition Classes
- JsMacrosWithOptions → JsMacros
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- macro def writes[A]: OWrites[A]
Creates a
OWrites[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.Creates a
OWrites[T]
by resolving, at compile-time, the case class fields or sealed family, and the required implicits.$macroWarning
$macroTypeParam
import play.api.libs.functional.syntax._ import play.api.libs.json.{ Json, JsonConfiguration, __ } case class User(userName: String, age: Int) implicit val userWrites1 = Json.writes[User] // macro-compiler replaces Json.writes[User] by injecting into compile chain // the exact code you would write yourself. This is strictly equivalent to: implicit val userWrites2 = ( (__ \ implicitly[JsonConfiguration].naming("userName")).write[String] and (__ \ implicitly[JsonConfiguration].naming("age")).write[Int] )(unlift(User.unapply))
- Definition Classes
- JsMacrosWithOptions → JsMacros
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)