I have json object which is reading like configuration.Getsection("XYZconfig").Get(); in code it is working fine in local.
After inserting the config values in azure keyvault the XYZconfig section is taking as below, The quotation is appending before and after brackets. so it is unable to read using configuration.Getsection("XYZconfig").Get(). How to read this config values.
"XYZconfig": "{ "key1":"vaule1",
"key2":"value2",
"key3":"value3"
}"
2
Answers
escape the string sequence
List of other string sequence:
https://www.freeformatter.com/json-escape.html
To access the configuration values you stored in Azure KeyVault from your ASP.NET Core web app, you can refer to following code snippet:
Read configuration value: