trait JsonFormatHints extends AnyRef
- Alphabetic
- By Inheritance
- JsonFormatHints
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait CoproductHint [T] extends AnyRef
-
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.
-
sealed
trait
JsNullBehaviour
extends AnyRef
Sometimes the wire format needs to match an existing format and
JsNullbehaviour needs to be customised.Sometimes the wire format needs to match an existing format and
JsNullbehaviour needs to be customised. This allows null behaviour to be defined at the product level. Field level control is only possible with a user-definedRootJsonFormat. -
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).
- trait ProductHint [T] extends AnyRef
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- implicit def coproductHint[T](implicit arg0: Typeable[T]): CoproductHint[T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- implicit def productHint[T](implicit arg0: Typeable[T]): ProductHint[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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
AlwaysJsNull
extends JsNullBehaviour with Product with Serializable
All values serialising to
JsNullwill be included in the wire format.All values serialising to
JsNullwill be included in the wire format. Ambiguous. -
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.
-
object
JsNullNotNone
extends JsNullBehaviour with Product with Serializable
Option values of
Noneare omitted, butSomevalues ofJsNullare retained.Option values of
Noneare omitted, butSomevalues ofJsNullare retained. Default. -
object
NeverJsNull
extends JsNullBehaviour with Product with Serializable
No values serialising to
JsNullwill be included in the wire format.No values serialising to
JsNullwill be included in the wire format. Ambiguous. -
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.