YamlDotNet icon indicating copy to clipboard operation
YamlDotNet copied to clipboard

YamlDotNet is a .NET library for YAML

Results 233 YamlDotNet issues
Sort by recently updated
recently updated
newest added
trafficstars

This PR intended to fix #991. **What's changed in this PR** - Replace `formatter.FormatNumber(object value);` call to `ToString("G", CultureInfo.InvariantCulture)`. - It's required to serialize special symbols (Nan/PositiveInfinite/NegativeInfinite) to JSON compatible...

If I serialize an integral double value (e.g `1.0`), it becomes a string. EDIT: From debugging, it looks like `NumericRegex` in `JsonEventEmitter.cs` is wrong. It does not match against single-digit...

https://github.com/aaubry/YamlDotNet/blob/7923dd8e600f7fea7710f3b45f3fadcfa1aa589c/YamlDotNet/Serialization/Utilities/TypeConverter.cs#L77 I guess this is the bug that breaks my `FromYaml` where I'm lacking specific type information: https://github.com/riezebosch/YamlDotNetDataReader/blob/main/YamlDotNetDataReader/DataReaderTypeConverter.cs#L27 Because it nows deserializes as a culture dependant object and incorrectly deserializes...

**Describe the bug** When serialize data to JSON. Some data are serialized as unexpected representation. **1. Serialized JSON data of `floating number` that contains `Exponential Notation` is serialized as `string`.**...

This PR intended to optimize performance for number deserialization by changing Parse to `TryParse` method. It's discussed at https://github.com/aaubry/YamlDotNet/pull/794 Additionally this PR fix `double` value deserialization problems that are found...

Common parts from ReadablePropertiesTypeInspector and WritablePropertiesTypeInspector are extracted to PropertiesTypeInspector and more changes to support #984: - virtual method PropertiesTypeInspector.CreateProperty - public property ReflectionPropertyDescriptor.PropertyInfo

Small improvements again when building against latest NET 9 SDK.

When DeserializerBuilder.Deserialize fails to parse, the thrown exception will lose the stack trace, making debugging difficult.

**Describe the bug** YAML 1.1 allows to have underscore in number representations, like `123_456` ([int](https://yaml.org/type/int.html)) and `123_456.78` ([float](https://yaml.org/type/float.html)). However, this seems partially supported in YamlDotNet. Underscore is supported when a...

**Describe the bug** I noticed that YamlDotNet 16.2.0 adds extra newlines when writing a foleded string. **To Reproduce** ```csharp var yaml = new SerializerBuilder().WithDefaultScalarStyle(ScalarStyle.Folded).Build(); var result = yaml.Serialize(new {Test=""" test...