izumi.distage.config.codec
Members list
Type members
Classlikes
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object TBigDecimalobject TBigIntobject TBigIntegerobject TBooleanobject TByteobject TCharobject TChronoUnitobject TConfigobject TConfigListobject TConfigMemorySizeobject TConfigObjectobject TConfigValueobject TDoubleobject TDurationobject TFiniteDurationobject TFloatobject TInstantobject TIntobject TJavaBigDecimalobject TJavaDurationobject TLongobject TPathobject TPatternobject TPeriodobject TRegexobject TShortobject TStringobject TURIobject TURLobject TUUIDobject TYearobject TZoneIdobject TZoneOffsetShow all
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConfigMetaBasicType.type
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ConfigMetaType.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class TBasicclass TCaseClassclass TListclass TMapclass TOptionclass TSealedTraitclass TSetclass TUnknownclass TVariantShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Type information for generated config codec, used to generate JSON Schemas for config in ConfigWriter role.
Type information for generated config codec, used to generate JSON Schemas for config in ConfigWriter role.
Attributes
- See also
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
- Self type
-
DIConfigMeta.type
Config reader that uses a pureconfig.ConfigReader implicit instance for a type to decode it from Typesafe Config.
Config reader that uses a pureconfig.ConfigReader implicit instance for a type to decode it from Typesafe Config.
Always automatically derives a codec if it's not available.
Automatic derivation will use camelCase fields, NOT kebab-case fields, as in default pureconfig. It also overrides pureconfig's default type field type discriminator for sealed traits, instead using a circe-like format with a single-key object.
Example:
sealed trait AorB
final case class A(a: Int) extends AorB
final case class B(b: String) extends AorB
final case class Config(values: List[AorB])
In config:
config {
values = [
{ A { a = 123 } },
{ B { b = cba } }
]
}
Auto-derivation will work without importing pureconfig.generic.auto._ and without any other imports
You may use izumi.distage.config.codec.PureconfigAutoDerive if you want to use DIConfigReader's deriving strategy to derive a standalone pureconfig codec:
final case class Abc(a: Duration, b: Regex, c: URL)
object Abc {
implicit val configReader: pureconfig.ConfigReader[Abc] =
PureconfigAutoDerive[Abc]
}
Attributes
- Note
-
on Scala.js DIConfigReader uses io.circe.Decoder instances to decode JSON configs, not HOCON as on JVM
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DIConfigReader.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object DIConfigMeta
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MetaAutoDerive.type
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MetaInstances.type
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PureconfigAutoDerive.type
Derive pureconfig.ConfigReader for A and for its fields recursively with pureconfig-magnolia
Derive pureconfig.ConfigReader for A and for its fields recursively with pureconfig-magnolia
This differs from just using pureconfig.module.magnolia.auto.reader.exportReader by using different configuration, defined in PureconfigInstances, specifically:
- Field name remapping is disabled,
camelCasefields will remain camelCase, notkebab-case - Sealed traits are rendered as in
circe, using a wrapper object with a single field, instead of using atypefield. Example:
sealed trait AorB
final case class A(a: Int) extends AorB
final case class B(b: String) extends AorB
final case class Config(values: List[AorB])
in config:
config {
values = [
{ A { a = 123 } },
{ B { b = cba } }
]
}
Attributes
- Companion
- object
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PureconfigInstances.type