The appsettings.json file is nothing less than the replacement of the good old Web.config file; the XML syntax has been replaced by a more readable (and less verbose) JSON format. Moreover, the new configuration model is based upon key/value settings that can be retrieved from a wide variety of sources, including--yet not limited to--Json files, using a centralized interface.
Once retrieved, they can be easily accessed within our code using Dependency Injection via literal strings (using the vanilla IConfiguration class):
public SampleController(IConfiguration configuration){ var myValue = configuration["Logging:IncludeScopes"];}
Alternatively, even in a strongly-typed fashion using a custom POCO class (we'll get ...