t

fommil.sjs

JsonFormatHints

trait JsonFormatHints extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonFormatHints
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait CoproductHint [T] extends AnyRef
  2. class FlatCoproductHint [T] extends CoproductHint[T]

    Product types are disambiguated by a {"key":"value",...}.

    Product types are disambiguated by a {"key":"value",...}. Of course, this will fail if the product type has a field with the same name as the key. The default key is the word "type" which is a keyword in Scala so unlikely to collide with too many case classes.

    This variant is most common in JSON serialisation schemes and well supported by other frameworks.

  3. sealed trait JsNullBehaviour extends AnyRef

    Sometimes the wire format needs to match an existing format and JsNull behaviour needs to be customised.

    Sometimes the wire format needs to match an existing format and JsNull behaviour needs to be customised. This allows null behaviour to be defined at the product level. Field level control is only possible with a user-defined RootJsonFormat.

  4. class NestedCoproductHint [T] extends CoproductHint[T]

    Product types are disambiguated by an extra JSON map layer containing a single key which is the name of the type of product contained in the value.

    Product types are disambiguated by an extra JSON map layer containing a single key which is the name of the type of product contained in the value. e.g. {"MyType":{...}}

    This variant may be more appropriate for non-polymorphic schemas such as MongoDB and Mongoose (consider using the above format on your endpoints, and this format when persisting).

  5. trait ProductHint [T] extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. implicit def coproductHint[T](implicit arg0: Typeable[T]): CoproductHint[T]
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  16. implicit def productHint[T](implicit arg0: Typeable[T]): ProductHint[T]
  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. object AlwaysJsNull extends JsNullBehaviour with Product with Serializable

    All values serialising to JsNull will be included in the wire format.

    All values serialising to JsNull will be included in the wire format. Ambiguous.

  23. object AlwaysJsNullTolerateAbsent extends JsNullBehaviour with Product with Serializable

    Same as AlwaysJsNull when serialising, with missing values treated as optional upon deserialisation.

    Same as AlwaysJsNull when serialising, with missing values treated as optional upon deserialisation. Ambiguous.

  24. object JsNullNotNone extends JsNullBehaviour with Product with Serializable

    Option values of None are omitted, but Some values of JsNull are retained.

    Option values of None are omitted, but Some values of JsNull are retained. Default.

  25. object NeverJsNull extends JsNullBehaviour with Product with Serializable

    No values serialising to JsNull will be included in the wire format.

    No values serialising to JsNull will be included in the wire format. Ambiguous.

  26. object UseDefaultJsNull extends JsNullBehaviour with Product with Serializable

    Use the case class default value provided for the field when available.

    Use the case class default value provided for the field when available. Ambiguous.

Inherited from AnyRef

Inherited from Any

Ungrouped