JsonDynamicConfigurationProvider

A dynamic configuration provider loads values from an asset configuration file.

The configuration file has JSON format and is named after a configuration group. It is read once at the first request of a value of a configuration group.

Configuration file schema

The configuration file contains a configuration version and an array of configuration values. Each value consists of a name and an array of versioned values. The latter has a value, a version it applies to, and an update strategy for any existing values.

The parser ignores incorrect data, like:

Example

{
"version": 3,
"configuration": [
{
"name": "exampleServiceIsEnabled",
"description": "Optional field: a configuration description.",
"values": [
{
"value": true,
"fromVersion": 1,
"updateStrategy": "always"
},
{
"value": false,
"fromVersion": 2,
"updateStrategy": "defaultOnly"
}
]
},
{
"name": "integerValue",
"values": [
{
"value": 42,
"fromVersion": 2,
"updateStrategy": "defaultOnly"
}
]
}
]
}

Constructors

Functions