decodeFromConfig

Decodes the given config into a value of type T using the given serializer.