Closed Velociraptor45 closed 1 year ago
Hey @Velociraptor45,
For this issue, you can use the package System.Text.Json.Serialization
and the C# Attribute from that package [JsonPropertyName("<propery-name>")
for all the properties of your class.
Updatin your MyConfig
class to the following should fix the issue for you:
using System.Text.Json.Serialization;
private class MyConfig
{
[JsonPropertyName("username")]
public string Username { get; set; } = string.Empty;
}
Thank you, @konidev20
No idea why I didn't think of that. Thanks.
Hey there,
let's say I have a key "username" in my secret and want to retrieve it
This won't fill the
Username
property inresult.Data.Data
because the secret's key is "username" (lower case). Making the C# property also lowercase works fine. However, it would be great to have some deserialization options where one could define e.g. case-insensitivity for property mapping.