object RW extends CompileRW
- Source
- RW.scala
- Alphabetic
- By Inheritance
- RW
- CompileRW
- 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]) @native()
- def enumeration[T](fieldName: String, mapping: (String, T)*): RW[T]
Convenience functionality for working with enumerations
Convenience functionality for working with enumerations
- 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
- def enumeration[T](list: List[T], asString: (T) => String = (t: T) => t.getClass.getSimpleName.replace("$", ""), caseSensitive: Boolean = false): RW[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def from[T](r: (T) => Json, w: (Json) => T, d: => DefType): RW[T]
- macro def gen[T]: RW[T]
- Definition Classes
- CompileRW
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @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
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def poly[P](fieldName: String = "type", getType: (P) => String = defaultGetType)(types: (String, RW[_ <: P])*): RW[P]
Convenience functionality for working with polymorphic types
Convenience functionality for working with polymorphic types
- 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)
- types
a list of tuples with the type names associated with their RW
- 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
the singleton value to use
- def string[T](asString: (T) => String, fromString: (String) => T): RW[T]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
- def wrapped[T](key: String, asJson: (T) => Json, fromJson: (Json) => T, definition: DefType = DefType.Dynamic): RW[T]