{"id":37034571,"url":"https://github.com/thijstijsma/writableconfiguration.json","last_synced_at":"2026-02-15T20:11:44.018Z","repository":{"id":38885761,"uuid":"161929391","full_name":"thijstijsma/WritableConfiguration.Json","owner":"thijstijsma","description":"Store settings that are configured at runtime.","archived":false,"fork":false,"pushed_at":"2022-06-23T18:51:55.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-07T06:24:07.720Z","etag":null,"topics":["configuration","csharp","json","netstandard"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thijstijsma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-15T17:41:35.000Z","updated_at":"2022-03-15T15:37:30.000Z","dependencies_parsed_at":"2022-09-18T15:01:54.821Z","dependency_job_id":null,"html_url":"https://github.com/thijstijsma/WritableConfiguration.Json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thijstijsma/WritableConfiguration.Json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstijsma%2FWritableConfiguration.Json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstijsma%2FWritableConfiguration.Json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstijsma%2FWritableConfiguration.Json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstijsma%2FWritableConfiguration.Json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thijstijsma","download_url":"https://codeload.github.com/thijstijsma/WritableConfiguration.Json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thijstijsma%2FWritableConfiguration.Json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration","csharp","json","netstandard"],"created_at":"2026-01-14T04:03:03.378Z","updated_at":"2026-01-14T04:03:04.084Z","avatar_url":"https://github.com/thijstijsma.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WritableConfiguration.Json\n\nStore settings that are configured at runtime.\n\nYou can specify the name of the configuration section and the file you want to use (default is \"appsettings.json\").\nNote that when you use a custom file you have to add that manually to the `ConfigurationBuilder`.\n\n## Installation\n\nReference the [ThijsTijsma.WritableConfiguration.Json](https://www.nuget.org/packages/ThijsTijsma.WritableConfiguration.Json/) NuGet package.\n\n## Usage\n~~~~csharp\npublic class Startup\n{\n    public void ConfigureServices(IServiceCollection services)\n    {\n        services.AddWritableJsonConfiguration\u003cExampleSettings\u003e(configuration.GetSection(\"Example\"), \"example.json\");\n    }\n}\n\npublic class SetupController : Controller\n{\n    private readonly IWritableOptions\u003cExampleSettings\u003e _exampleSettings;\n\n    public SetupController(IWritableOptions\u003cExampleSettings\u003e exampleSettings)\n    {\n\t    _exampleSettings = exampleSettings;\n    });\n\n    [HttpPost]\n    public IActionResult SaveConnectionString([FromBody] string connectionString)\n    {\n        _exampleSettings.Value.ConnectionString = connectionString;\n        _exampleSettings.Write();\n\n        return View();\n    }\n}\n~~~~\n### Output\n\n~~~~json\n{\n  \"Example\":\n  {\n    \"ConnectionString\": \"Server=localhost\"\n  }\n}\n~~~~\n\n## Credits\n\nInspired by StackOverflow answers from [Matze](https://stackoverflow.com/a/42705862/) and [ceferrari](https://stackoverflow.com/a/45986656/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthijstijsma%2Fwritableconfiguration.json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthijstijsma%2Fwritableconfiguration.json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthijstijsma%2Fwritableconfiguration.json/lists"}