AWS Secrets Manager ↔ .NET appsettings.json Converter
VS Code extension to convert flat JSON used in AWS Secrets Manager
into hierarchical JSON in the .NET appsettings.json format — and back again.
Uses the standard .NET configuration key separator: __.
Features
- Flat → Hierarchical — AWS Secrets Manager format to
.NET appsettings.json
- Hierarchical → Flat —
.NET appsettings.json to AWS Secrets Manager format
- Array support — numeric index keys (
__0, __1, …) are converted to/from JSON arrays
- Automatic alphabetical sorting of all keys (case-insensitive)
- Works on selection or entire file — select a JSON fragment or run on the full document
- Copy to clipboard — copy the transformed result without replacing the file
Usage
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:
| Command |
Description |
JSON: Convert Flat → Hierarchical (.NET appsettings) |
AWS Secrets Manager → appsettings.json |
JSON: Convert Hierarchical → Flat (AWS Secrets Manager) |
appsettings.json → AWS Secrets Manager |
JSON: Copy Result to Clipboard |
Copy the last result to clipboard |
Examples
Flat → Hierarchical
Input (AWS Secrets Manager)
{
"ConnectionStrings__Default": "Server=localhost",
"Jwt__Issuer": "my-app",
"Jwt__Audience__0": "api",
"Jwt__Audience__1": "dashboard",
"Serilog__MinimumLevel__Default": "Information"
}
Output (.NET appsettings.json)
{
"ConnectionStrings": {
"Default": "Server=localhost"
},
"Jwt": {
"Audience": ["api", "dashboard"],
"Issuer": "my-app"
},
"Serilog": {
"MinimumLevel": {
"Default": "Information"
}
}
}
Hierarchical → Flat
Input (.NET appsettings.json)
{
"ExternalProviders": {
"NiaraProvider": {
"Audience": ["niara", "bee2pay"],
"ClientId": "abc123"
}
}
}
Output (AWS Secrets Manager)
{
"ExternalProviders__NiaraProvider__Audience__0": "niara",
"ExternalProviders__NiaraProvider__Audience__1": "bee2pay",
"ExternalProviders__NiaraProvider__ClientId": "abc123"
}
Configuration
| Setting |
Default |
Description |
jsonAwsSecrets.separator |
__ |
Key separator for nested levels |
License
MIT