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 use loadConfig.

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 (Scala 2.11+);
  • sealed families of case classes (ADTs).

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.