final case class Configuration(transformMemberNames: (String) ⇒ String, transformConstructorNames: (String) ⇒ String, useDefaults: Boolean, discriminator: Option[String], strictDecoding: Boolean = false) extends Product with Serializable
Configuration allowing customisation of the JSON produced when encoding, or expected when decoding. Can be used with the ConfiguredJsonCodec annotation to allow customisation of the semi-automatic derivation.
- transformMemberNames
Transforms the names of any case class members in the JSON allowing, for example, formatting or case changes.
- transformConstructorNames
Transforms the value of any constructor names in the JSON allowing, for example, formatting or case changes.
- useDefaults
Whether to allow default values as specified for any case-class members.
- discriminator
Optional key name that, when given, will be used to store the name of the constructor of an ADT in a nested field with this name. If not given, the name is instead stored as a key under which the contents of the ADT are stored as an object.
- strictDecoding
Whether to fail when superfluous fields are found.
- Alphabetic
- By Inheritance
- Configuration
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Configuration(transformMemberNames: (String) ⇒ String, transformConstructorNames: (String) ⇒ String, useDefaults: Boolean, discriminator: Option[String], strictDecoding: Boolean = false)
- transformMemberNames
Transforms the names of any case class members in the JSON allowing, for example, formatting or case changes.
- transformConstructorNames
Transforms the value of any constructor names in the JSON allowing, for example, formatting or case changes.
- useDefaults
Whether to allow default values as specified for any case-class members.
- discriminator
Optional key name that, when given, will be used to store the name of the constructor of an ADT in a nested field with this name. If not given, the name is instead stored as a key under which the contents of the ADT are stored as an object.
- strictDecoding
Whether to fail when superfluous fields are found.
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( ... ) @native() @HotSpotIntrinsicCandidate()
- val discriminator: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val strictDecoding: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val transformConstructorNames: (String) ⇒ String
- val transformMemberNames: (String) ⇒ String
- val useDefaults: Boolean
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withDefaults: Configuration
- def withDiscriminator(discriminator: String): Configuration
- def withKebabCaseConstructorNames: Configuration
- def withKebabCaseMemberNames: Configuration
- def withSnakeCaseConstructorNames: Configuration
- def withSnakeCaseMemberNames: Configuration
- def withStrictDecoding: Configuration