Assume this section is in appsettings.json
{ "crypto":{ "A": "some value", "B": "foo foo", "C": "last part" }, ... }
Where "crypto" is a json serialization of some cryptographic key.
Later in the code I need to do something like this:
var keyOptions = CryptoProvider.RestoreFromJson(Configuration.GetSection("crypto"))
But Configuration.GetSection returns a ConfigurationSection instance. Is there any way to get raw json data?
I assumed that ConfigurationSection.Value should do the trick, but for some reason it is always null .
json c # asp.net-core asp.net-core-mvc
Ph0en1x
source share