Open carlin-q-scott opened 1 year ago
Hi @carlin-q-scott , as of now we recommend using the application/json content type and converting yaml data to json format when necessary. Please let us know if you have any questions or issues you feel aren't addressed by this approach.
The issue is having to convert back and forth between JSON and YAML. azure App Configuration is targeting administrators who enjoy simplicity. YAML is simplicity - there's a reason it's achieved nearly ubiquitous adoption. Sorry to sound snarky, but I feel like this was self-evident in the OP's request and the response seemed very dismissive.
I never intended to be dismissive of the original question, so I'm sorry if I came across that way. From what I understand, yaml can be converted to json fairly easily so I thought it wouldn't introduce a large hurdle for anyone who wants to parse a yaml file. I wanted to know if anyone's aware of an issue with this, or a use case that I might not have considered, because then I would appreciate them bringing up any issues with my original understanding.
I agree that having YAML parsing could make things a bit easier for some users. The nuget package for parsing yaml that was mentioned does mean we have to add a new dependency, which we usually try to avoid. We didn't think there was a strong enough reason to add this capability, so we recommended the approach that I mentioned. We're of course open to reconsidering this if it's something that people feel strongly about.
@amerjusupovic You could instead make IKeyValueAdapter
a part of the public API to allow parsing extensions. A separate package such as Microsoft.Extensions.Configuration.AzureAppConfiguration.Yaml
could be provided to add the request YAML support.
@amerjusupovic You could instead make
IKeyValueAdapter
a part of the public API to allow parsing extensions. A separate package such asMicrosoft.Extensions.Configuration.AzureAppConfiguration.Yaml
could be provided to add the request YAML support.
And here I was thinking we could do this on my project (implementing our own IKeyValueAdapters). Are there any plans for this? or any workarounds
I'd like to be able to store application/yaml content in my app config keys and have this library deserialize it.
I found the json key value adaptor in src/Microsoft.Extensions.Configuration.AzureAppConfiguration/JsonKeyValueAdapter.cs. I don't think it would take much work to implement that for yaml. But it would add a dependency on another nuget package.