Built-in Supported Types

PureConfig comes with baked-in support for many types, most of them from the standard Java and Scala libraries. When using those types, users don’t have to provide anything else in order to be able to load a config.

The currently supported basic types are:

Additionally, PureConfig also handles the following collections and composite Scala structures:

  • Option for optional values, i.e. values that can or cannot be in the configuration, of types on this list;
  • collections implementing the TraversableOnce trait, where the type of the elements is on this list;
  • Maps from String keys to any value type that is on this list;
  • Maps from types convertible to String to any value type that is on this list (must be configured first - see Configurable Converters);
  • shapeless.HLists of elements whose type is on this list;
  • case classes;
  • classes with only public val and var parameters in their constructor;
  • sealed families of case classes (ADTs).

Finally, on Scala 3 PureConfig has early support for native type class derivation. See Scala 3 Derivation for more details.

The support for these types already covers most simple cases, such as the one shown in Quick Start. See Supporting New Types to see how to support types that are not on those lists and Overriding Behavior for Types to change how PureConfig reads the built-in types above.