Also adds the ability to specify the number format for the project, defaults to yaml standard.
To specify the number format when serializing or deserializing, use a custom YamlFormatter, setting the NumberFormat property to what you want, for example, CultureInfo.CurrentCulture.NumberFormat and pass that in to the builders with the WithYamlFormatter method.
Full example, to use the current culture's number format,
var serializer = new SerializerBuilder()
.WithYamlFormatter(
new YamlFormatter
{
NumberFormat = CultureInfo.CurrentCulture.NumberFormat
}
).Build();
Fixes #792
Also adds the ability to specify the number format for the project, defaults to yaml standard.
To specify the number format when serializing or deserializing, use a custom
YamlFormatter
, setting theNumberFormat
property to what you want, for example,CultureInfo.CurrentCulture.NumberFormat
and pass that in to the builders with theWithYamlFormatter
method.Full example, to use the current culture's number format,