Closed
Description
Describe the bug
KubernetesYaml uses Culture dependant string formatting for floating point numbers.
Kubernetes C# SDK Client Version
13.0.11
Server Kubernetes Version
N/A
Dotnet Runtime Version
net8
To Reproduce
using k8s;
using System.Globalization;
CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("fr-fr");
Console.WriteLine(KubernetesYaml.Serialize(new Dictionary<string, double>() { ["hello"] = 10.01 }));
Console.WriteLine(KubernetesJson.Serialize(new Dictionary<string, double>() { ["hello"] = 10.01 }));
hello: 10,01
{"hello":10.01}
Expected behavior
Yaml shouldn't be culture dependant, a decimal 10.01 should always, in any culture, be outputted with a decimal point in yaml.
KubeConfig
N/A
Where do you run your app with Kubernetes SDK (please complete the following information):
- OS:
N/A
- Environment:
N/A
- Cloud
N/A
Additional context
This is the source of this issue: buehler/dotnet-operator-sdk#581
Metadata
Metadata
Assignees
Labels
No labels