{"id":75223,"date":"2022-09-28T08:47:08","date_gmt":"2022-09-28T06:47:08","guid":{"rendered":"https:\/\/drafts.code-maze.com\/?p=75198"},"modified":"2024-04-04T17:54:46","modified_gmt":"2024-04-04T15:54:46","slug":"aspnetcore-read-appsettings-values-from-a-json-file","status":"publish","type":"post","link":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/","title":{"rendered":"How to Read AppSettings Values From a JSON File in .NET Core"},"content":{"rendered":"<p>In this post, we are going to learn how to read AppSettings values from a JSON file in ASP.NET Core.<\/p>\n<div style=\"padding: 20px; border-left: 5px color:#dc2323 solid; display: block; margin-bottom: 20px; box-shadow: 1px 1px 5px 0px lightgrey;\">To download the source code for the video, visit our <a href=\"https:\/\/www.patreon.com\/posts\/source-code-how-99786236?src=readAppSettingsFromJson\" target=\"_blank\" rel=\"nofollow noopener\">Patreon page<\/a> (YouTube Patron tier).<\/div>\n<p>Let&#8217;s start.<\/p>\n<hr \/>\r\n<p style=\"text-align: center;\"><strong>VIDEO<\/strong>: How to Read AppSettings Values From a JSON File in ASP.NET Core.<\/p>\r\n<p style=\"text-align: center;\"><iframe width=\"560\" height=\"315\" src=https:\/\/www.youtube.com\/embed\/zluXlzbo4f4?si=4iEej8coUzaKlT5d frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\r\n<hr \/>\n<h2>Read AppSettings Values From JSON File<\/h2>\n<p>Enabling a feature in ASP.NET Core almost always starts with configuring relevant components into the DI pipeline. This is also true for reading application settings from a JSON file. The good thing is that ASP.NET Core provides extra flexibility here. As long as we use the conventional filename, i.e. <code>appsettings.json<\/code>, we don&#8217;t need any explicit setup for it. <a href=\"https:\/\/code-maze.com\/dependency-injection-aspnet\/\" target=\"_blank\" rel=\"noopener\">DI system<\/a> will do it internally for us. In a later section, we will see how we can set up a different filename.<\/p>\n<p>So, let&#8217;s assume we have an <code>appsettings.json<\/code> file that defines some formatting options for our API:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">{\r\n  \"AllowedHosts\": \"*\",\r\n  \"Formatting\": {\r\n    \"Localize\":  false,\r\n    \"Number\": {\r\n      \"Format\": \"n2\",\r\n      \"Precision\": 3\r\n    }\r\n  }\r\n}<\/pre>\n<p>As we run the application, DI framework automatically pulls this piece of data in <code>IConfiguration<\/code> service.<\/p>\n<h3>Read Values From IConfiguration<\/h3>\n<p>To see <code>IConfiguration<\/code> in action, let&#8217;s add an API controller:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public class ConfigurationDemoController : ControllerBase\r\n{\r\n    private readonly IConfiguration _configuration;\r\n\r\n    public ConfigurationDemoController(IConfiguration configuration)\r\n    {\r\n        _configuration = configuration;\r\n    }\r\n\r\n    [HttpGet(\"formatting\/islocalized\")]\r\n    public bool GetIsLocalized()\r\n    {\r\n        var localize = _configuration.GetValue&lt;bool&gt;(\"Formatting:Localize\");\r\n\r\n        return localize;\r\n    }\r\n}<\/pre>\n<p>We start with injecting <code>IConfiguration<\/code> in the constructor. Later inside the <code>GetIsLocalized<\/code> endpoint, we can retrieve the &#8220;Localize&#8221; option by calling <code>_configuration.GetValue()<\/code>. To do this, we have to specify the full path of the target json-node, notably with &#8220;:&#8221; as the child node accessor.<\/p>\n<p>We can extract the value of &#8220;Precision&#8221; similarly:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">var precision = _configuration.GetValue&lt;int&gt;(\"Formatting:Number:Precision\");<\/code><\/p>\n<p>Pulling the whole &#8220;Formatting&#8221; group is also possible &#8211; by using a POCO model that resembles the target JSON tree.<\/p>\n<p>The <code>FormatSettings<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public class FormatSettings\r\n{\r\n    public bool Localize { get; set; }\r\n\r\n    public NumberSettings? Number { get; set; }\r\n}<\/pre>\n<p>And the <code>NumberSettings<\/code>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public class NumberSettings\r\n{\r\n    public string? Format { get; set; }\r\n\r\n    public int Precision { get; set; }\r\n}<\/pre>\n<p>Now, we can easily map the &#8220;Formatting&#8221; section to a <code>FormatSettings<\/code> instance:<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">var formatSettings = _configuration.GetSection(\"Formatting\").Get&lt;FormatSettings&gt;();<\/code><\/p>\n<p>This way of extracting group configurations is quite convenient. But not as much as it would with <a href=\"https:\/\/code-maze.com\/aspnet-configuration-options\/\" target=\"_blank\" rel=\"noopener\">Options Pattern<\/a>, especially if we need it in multiple places.<\/p>\n<h3>Using Options Pattern<\/h3>\n<p>To start using the options pattern for reading <code>FormatSettings<\/code>, we need to configure it with DI first.<\/p>\n<p>Let&#8217;s do it in <code>Program<\/code> class:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-highlight=\"4\">var builder = WebApplication.CreateBuilder(args);\r\n\r\n\/\/ Add services to the container.\r\nbuilder.Services.Configure&lt;FormatSettings&gt;(builder.Configuration.GetSection(\"Formatting\"));\r\nbuilder.Services.AddControllers();\r\n\r\nvar app = builder.Build();\r\n\r\napp.MapControllers();\r\n\r\napp.Run();<\/pre>\n<p>All we need is to add the highlighted line in this boilerplate code. With the help of the <code>Configure()<\/code> extension method, we establish the &#8220;Formatting&#8221; section as the data source of <code>FormatSettings<\/code>.<\/p>\n<p>This enables easy access to <code>FormatSettings<\/code> just by injecting <code>IOptions&lt;FormatSettings&gt;<\/code> anywhere we need it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">public class OptionsDemoController : ControllerBase\r\n{\r\n    private readonly FormatSettings _formatSettings;\r\n\r\n    public OptionsDemoController(IOptions&lt;FormatSettings&gt; options)\r\n    {\r\n        _formatSettings = options.Value;\r\n    }\r\n\r\n    [HttpGet(\"formatting\")]\r\n    public FormatSettings Get() =&gt; _formatSettings;\r\n}<\/pre>\n<p>This is much simpler and the recommended way to deal with configuration groups.<\/p>\n<h2>Register JSON File With Unconventional Name<\/h2>\n<p>It&#8217;s time to see how to register an arbitrary JSON configuration file.\u00a0<\/p>\n<p>So, if we want to set up a &#8220;config.json&#8221; file as the source of application configuration:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\" data-enlighter-highlight=\"2-5\">\/\/ Add services to the container.\r\nbuilder.Host.ConfigureAppConfiguration(config =&gt;\r\n{\r\n    config.AddJsonFile(\"config.json\");\r\n});\r\nbuilder.Services.Configure&lt;FormatSettings&gt;(builder.Configuration.GetSection(\"Formatting\"));\r\nbuilder.Services.AddControllers();<\/pre>\n<p>We can register it using a host configurator extension named\u00a0 <code>ConfigureAppConfiguration<\/code>. Inside its closure, we just need to call <code>AddJsonFile()<\/code>. As simple as that.<\/p>\n<h2>Read AppSettings Outside of DI<\/h2>\n<p>Sometimes we need to read configurations outside of ASP.NET Core DI. This is a typical case when we work with design time execution or CLI tools like generating database migration files (Entity Framework Core) for example.<\/p>\n<p>Dependencyless <code>ConfigurationBuilder<\/code> class comes in handy for such cases:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">var configuration = new ConfigurationBuilder()\r\n    .AddJsonFile(\"config.json\")\r\n    .Build();\r\n\r\nvar precision = configuration.GetValue&lt;int&gt;(\"Formatting:Number:Precision\");<\/pre>\n<p>We can get a default <code>IConfiguration<\/code> just by adding the target json file to the builder. The rest is no different than our previous examples.<\/p>\n<h2>Conclusion<\/h2>\n<p>In this article, we have discussed various approaches to read configurations from a JSON file in ASP.NET Core.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we are going to learn how to read AppSettings values from a JSON file in ASP.NET Core. Let&#8217;s start. Read AppSettings Values From JSON File Enabling a feature in ASP.NET Core almost always starts with configuring relevant components into the DI pipeline. This is also true for reading application settings from a [&hellip;]<\/p>\n","protected":false},"author":38,"featured_media":62187,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1369],"tags":[1434,79,1436,735,927,1435,130],"class_list":["post-75223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-json","tag-appsettings","tag-asp-net-core","tag-iconfiguration","tag-ioptions","tag-json","tag-read-json-file","tag-web-api","et-has-post-format-content","et_post_format-et-post-format-standard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Read AppSettings Values From a JSON File in .NET Core<\/title>\n<meta name=\"description\" content=\"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Read AppSettings Values From a JSON File in .NET Core\" \/>\n<meta property=\"og:description\" content=\"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Code Maze\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-28T06:47:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-04T15:54:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"620\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ahsan Ullah\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeMazeBlog\" \/>\n<meta name=\"twitter:site\" content=\"@CodeMazeBlog\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ahsan Ullah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\"},\"author\":{\"name\":\"Ahsan Ullah\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/90ad30bf08ba4a2ee4d4489a005da7e0\"},\"headline\":\"How to Read AppSettings Values From a JSON File in .NET Core\",\"datePublished\":\"2022-09-28T06:47:08+00:00\",\"dateModified\":\"2024-04-04T15:54:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\"},\"wordCount\":555,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\/\/code-maze.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png\",\"keywords\":[\"appsettings\",\"asp.net core\",\"IConfiguration\",\"IOptions\",\"JSON\",\"read json file\",\"Web API\"],\"articleSection\":[\"JSON\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\",\"url\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\",\"name\":\"How to Read AppSettings Values From a JSON File in .NET Core\",\"isPartOf\":{\"@id\":\"https:\/\/code-maze.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png\",\"datePublished\":\"2022-09-28T06:47:08+00:00\",\"dateModified\":\"2024-04-04T15:54:46+00:00\",\"description\":\"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples\",\"breadcrumb\":{\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png\",\"width\":1100,\"height\":620,\"caption\":\"ASP.NET Core\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/code-maze.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Read AppSettings Values From a JSON File in .NET Core\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/code-maze.com\/#website\",\"url\":\"https:\/\/code-maze.com\/\",\"name\":\"Code Maze\",\"description\":\"Learn. Code. Succeed.\",\"publisher\":{\"@id\":\"https:\/\/code-maze.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/code-maze.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/code-maze.com\/#organization\",\"name\":\"Code Maze\",\"url\":\"https:\/\/code-maze.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png\",\"width\":3511,\"height\":3510,\"caption\":\"Code Maze\"},\"image\":{\"@id\":\"https:\/\/code-maze.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/CodeMazeBlog\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/90ad30bf08ba4a2ee4d4489a005da7e0\",\"name\":\"Ahsan Ullah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/code-maze.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2023\/12\/ahsan-ullah-profile-150x150.jpeg\",\"contentUrl\":\"https:\/\/code-maze.com\/wp-content\/uploads\/2023\/12\/ahsan-ullah-profile-150x150.jpeg\",\"caption\":\"Ahsan Ullah\"},\"description\":\"A Senior IT Developer with demonstrated proficiency (10+ years of experience) in supply chain management software projects of DSV A\/S. Senior member of the core development team helping to meet growing business demands. Competent in the .NET platform and Angular applications. Other expertise includes skills in database development, designing algorithms, and developing interfaces from low-level responsive html tools to high-level middleware services.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/md-ahsan-ullah-665aa7215\/\"],\"url\":\"https:\/\/code-maze.com\/author\/aullah\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Read AppSettings Values From a JSON File in .NET Core","description":"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/","og_locale":"en_US","og_type":"article","og_title":"How to Read AppSettings Values From a JSON File in .NET Core","og_description":"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples","og_url":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/","og_site_name":"Code Maze","article_published_time":"2022-09-28T06:47:08+00:00","article_modified_time":"2024-04-04T15:54:46+00:00","og_image":[{"width":1100,"height":620,"url":"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png","type":"image\/png"}],"author":"Ahsan Ullah","twitter_card":"summary_large_image","twitter_creator":"@CodeMazeBlog","twitter_site":"@CodeMazeBlog","twitter_misc":{"Written by":"Ahsan Ullah","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#article","isPartOf":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/"},"author":{"name":"Ahsan Ullah","@id":"https:\/\/code-maze.com\/#\/schema\/person\/90ad30bf08ba4a2ee4d4489a005da7e0"},"headline":"How to Read AppSettings Values From a JSON File in .NET Core","datePublished":"2022-09-28T06:47:08+00:00","dateModified":"2024-04-04T15:54:46+00:00","mainEntityOfPage":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/"},"wordCount":555,"commentCount":10,"publisher":{"@id":"https:\/\/code-maze.com\/#organization"},"image":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage"},"thumbnailUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png","keywords":["appsettings","asp.net core","IConfiguration","IOptions","JSON","read json file","Web API"],"articleSection":["JSON"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/","url":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/","name":"How to Read AppSettings Values From a JSON File in .NET Core","isPartOf":{"@id":"https:\/\/code-maze.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage"},"image":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage"},"thumbnailUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png","datePublished":"2022-09-28T06:47:08+00:00","dateModified":"2024-04-04T15:54:46+00:00","description":"Explains how to read AppSettings values from a JSON file in ASP.NET Core including rich examples and code samples","breadcrumb":{"@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#primaryimage","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2021\/12\/social-aspnetcore.png","width":1100,"height":620,"caption":"ASP.NET Core"},{"@type":"BreadcrumbList","@id":"https:\/\/code-maze.com\/aspnetcore-read-appsettings-values-from-a-json-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code-maze.com\/"},{"@type":"ListItem","position":2,"name":"How to Read AppSettings Values From a JSON File in .NET Core"}]},{"@type":"WebSite","@id":"https:\/\/code-maze.com\/#website","url":"https:\/\/code-maze.com\/","name":"Code Maze","description":"Learn. Code. Succeed.","publisher":{"@id":"https:\/\/code-maze.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/code-maze.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/code-maze.com\/#organization","name":"Code Maze","url":"https:\/\/code-maze.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/#\/schema\/logo\/image\/","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2020\/01\/Code-Maze-Only-Logo-Transparent-HRez.png","width":3511,"height":3510,"caption":"Code Maze"},"image":{"@id":"https:\/\/code-maze.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/CodeMazeBlog"]},{"@type":"Person","@id":"https:\/\/code-maze.com\/#\/schema\/person\/90ad30bf08ba4a2ee4d4489a005da7e0","name":"Ahsan Ullah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/code-maze.com\/#\/schema\/person\/image\/","url":"https:\/\/code-maze.com\/wp-content\/uploads\/2023\/12\/ahsan-ullah-profile-150x150.jpeg","contentUrl":"https:\/\/code-maze.com\/wp-content\/uploads\/2023\/12\/ahsan-ullah-profile-150x150.jpeg","caption":"Ahsan Ullah"},"description":"A Senior IT Developer with demonstrated proficiency (10+ years of experience) in supply chain management software projects of DSV A\/S. Senior member of the core development team helping to meet growing business demands. Competent in the .NET platform and Angular applications. Other expertise includes skills in database development, designing algorithms, and developing interfaces from low-level responsive html tools to high-level middleware services.","sameAs":["https:\/\/www.linkedin.com\/in\/md-ahsan-ullah-665aa7215\/"],"url":"https:\/\/code-maze.com\/author\/aullah\/"}]}},"_links":{"self":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/75223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/users\/38"}],"replies":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/comments?post=75223"}],"version-history":[{"count":4,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/75223\/revisions"}],"predecessor-version":[{"id":75224,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/posts\/75223\/revisions\/75224"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/media\/62187"}],"wp:attachment":[{"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/media?parent=75223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/categories?post=75223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-maze.com\/wp-json\/wp\/v2\/tags?post=75223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}