✅ Reading a yaml file that has multiple types
I'm having trouble finding examples that show how, given a key, to return a value which may be a string, int or list.
Whats the path of least complexity to get any value from any key, leaving up to the user to make sure correct methods are used on correct types?
var value = configuration[key]; works on primitive types only;var value = configuration.GetSection(key).GetChildren().Select(x => x.Value).ToList(); works(ish) on list but not on primitive types.Whats the path of least complexity to get any value from any key, leaving up to the user to make sure correct methods are used on correct types?
