Trait

spray.json

JsonFormatHints

Related Doc: package json

Permalink

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

    Permalink
  2. class FlatCoproductHint[T] extends CoproductHint[T]

    Permalink

    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

    Permalink

    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]

    Permalink

    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

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object AlwaysJsNull extends JsNullBehaviour with Product with Serializable

    Permalink

    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.

  5. object AlwaysJsNullTolerateAbsent extends JsNullBehaviour with Product with Serializable

    Permalink

    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.

  6. object JsNullNotNone extends JsNullBehaviour with Product with Serializable

    Permalink

    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.

  7. object NeverJsNull extends JsNullBehaviour with Product with Serializable

    Permalink

    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.

  8. object UseDefaultJsNull extends JsNullBehaviour with Product with Serializable

    Permalink

    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.

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit def coproductHint[T](implicit arg0: Typeable[T]): CoproductHint[T]

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. implicit def productHint[T](implicit arg0: Typeable[T]): ProductHint[T]

    Permalink
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped