Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 721 Bytes

Stores_JsonFile.md

File metadata and controls

33 lines (24 loc) · 721 Bytes

JSON File Store

Since v4.5 JSON store provider is located in a separate package NuGet

To configure the store:

IMySettings settings = new ConfigurationBuilder<IMySettings>()
   .UseJsonFile(path)
   .Build();

The store supports reading and writing.

In the simplest form every key in the JSON file corresponds to the name of an option. For instance a definition

public interface IMySettings
{
   string AuthClientId { get; }
   string AuthClientSecreat { get; }
}

will correspond to the following JSON file:

{
   "AuthClientId":"Id",
   "AuthClientSecret":"Secret"
}