Skip to content

Configuration Structure

Adhika P. edited this page Jan 20, 2025 · 1 revision

Configuration Structure

ConfigFern uses the standard .NET configuration format. Below is an example of a typical configuration structure:

{
  "ConnectionStrings": {
    "DefaultConnection": "ENC:Server=localhost;Database=mydb;User Id=myUsername;Password=myPassword;"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning"
    }
  },
  "AppSettings": {
    "ApplicationName": "MyDotNetApp",
    "Features": {
      "EnableCache": true,
      "RetryPolicy": {
        "MaxRetries": 3,
        "DelaySeconds": 5
      }
    }
  }
}

Key Features

  • Uses standard JSON format
  • Supports nested configuration sections
  • Encrypted values are prefixed with "ENC:"
  • Compatible with standard .NET configuration providers

Naming Conventions

  • Use PascalCase for section names
  • Use descriptive, hierarchical keys

Back to Home

Clone this wiki locally