encodeToConfig
Encodes the given value into a Config using the given serializer.
Throws
If list or primitive type passed as a value.
Encodes the given value into a Config using the given serializer.
If list or primitive type passed as a value.