Asp.Net Core Tip: Get JSON object from appsettings.json using IConfiguration

added by DotNetKicks
10/26/2018 1:40:47 PM

1 Kicks, 131 Views

In this quick post, I want to share how to get JSON object as a value from appsettings.json using IConfiguration . For example In the above key/value pairs, if you try to pull value using a regular approach with IConfiguration like _configuration["KEY"] then it works only with the key country (or any key with simple value) but not with defaultlocations (or any key with object type value).


0 comments