Azure Function Publish local.settings.json Value Formatting

상준 이 251 Reputation points

I'm curious about the setup when publishing an Azure Function App via Visual Studio 2019.
Let's take an example local.settings.json.

  "IsEncrypted": false,
  "Values": {
    "MySetting1": "asdfsdf",
    "MySetting2": {
      "MySetting2-1": false,
      "MySetting2-2": false,
    "MySetting3": [

How can I input through Visual Studio in the form above?
I found the method below, but do I have to set the config file only in the style below?

"MySetting2:MySetting2-1": false,
"MySetting2:MySetting2-2": false,
"MySetting3:[0]:key1": "asdfsadf",
"MySetting3:[1]:key2": "asdfajlwsenr",
"MySetting3:[2]:key3": "awerjlnwaesrsdfsd",

Do I have to create each setting value in one line like the example in the link above?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,033 questions
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
188 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 54,456 Reputation points

    @상준 이 The settings are key value pair and you cannot use value as arrays but you can define something value like array having key value pair. Yes your understanding is correct how you define in your example.

    "MySetting3": [  
            "key1": "value1",  
            "key2": "value2"  
            "key1": "value3",  
            "key2": "value4"  

0 additional answers

Sort by: Most helpful