SkillAgentSearch skills...

JsonConfig

Configuration framework based on json.

Install / Use

/learn @andreazevedo/JsonConfig
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

JsonConfig

JsonConfig is a simple configuration framework based on json and the dynamic type avaible in .NET Framework 4.0+

Getting Started

  1. In your project, add reference to JsonConfig.dll

  2. Add a file to your project named "app.json.config" with your configuration in a json format. Example:

{
  name: "My Project",
  host: "localhost",
  port: 80
}
  1. If your project is not a web project, you need to set the file to "Copy to the output directory if changed".

  2. Just use the dynamic config object in your code as follows:

Console.WriteLine("name: {0}", JsonConfigManager.DefaultConfig.name);
Console.WriteLine("host: {0}", JsonConfigManager.DefaultConfig.host);
Console.WriteLine("port: {0}", JsonConfigManager.DefaultConfig.port);

Config file

You can use any config file name you want. Checkout the unit tests to find out how.

Licensing

Released under the MIT license.

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated8y ago
Forks0

Languages

C#

Security Score

70/100

Audited on Nov 17, 2017

No findings