Azure App Configuration service

The other day I was asked if it’s possible to put objects, arrays, etc as the value for a configuration variable. Hm… Good question.

Figured, how about JSON to the rescue? And it worked.

I created a simple .NET Core console app that reads a JSON string from Azure App Configuration service and parses the JSON into an int array.

In App Configuration service…

  • The Key name is: foo

  • The json string looks like this: {“value” : [0,1,2,3,4]}

  • I set the Content type to JSON, but that isn’t required.

The output from the program is:
this is a test: {"value" : [0,1,2,3,4]}
element is: 0
element is: 1
element is: 2
element is: 3
element is: 4

The sample program is located in my GitHub repo here.

Here are a couple of handy references: