I have a piece of YAML that contains the string literal "null". Other YAML parsers (e.g. YamlDotNet) treat this as a string "null", but SharpYaml interprets it as just null.
Example:
values:
- name: "null"
value: 5
summary: No fill.
public class YEnum
{
public List<YEnumValue> Values { get; set; } = new();
}
public class YEnumValue
{
public string Name { get; set; }
public int Value { get; set; }
public string Summary { get; set; }
}
I have a piece of YAML that contains the string literal
"null"
. Other YAML parsers (e.g. YamlDotNet) treat this as a string"null"
, but SharpYaml interprets it as justnull
.Example:
Expected deserialization result:
myEnum.Values[0].Name == "null"
Actual deserialization result:myEnum.Values[0].Name == null