1

I'm creating an Azure Function project on Visual Studio 2017,

the application was working well until I add a string array to local.settings.json

workinging json:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
    "RequestTimeout": "600000"
  }
}

enter image description here

Not working json:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
    "RequestTimeout": "600000",
    "Urls": [
      "https://url1.com.br/",
      "https://url2.com.br"
    ]
  }
}

enter image description here

enter image description here

What should I have to do to add this string array to the config file?

1 Answer 1

2

You probably can't... local.settings.json is just one method to set configuration; others are with environment variables and Application settings in the portal. Those methods only allow strings as values.

Try encoding your array inside a string, and then deserialize it at runtime.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.