You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect obj.TestField to have a value of 16. However, an exception is thrown during deserialization, when trying to parse "0x10" in ScalarNodeDeserializer.cs:
caseTypeCode.Int32:
value =Int32.Parse(scalar.Value,numberFormat);break;
It seems that the possibility of having a non-decimal base is being ignored. Many integer bases (binary, octal, hexadecimal and sexagesimal) should be allowed per the YAML spec. For reference, this works as expected in pyyaml:
Addresses issue aaubry#113. Adds basic support for deserializing scalar integers
written in binary, octal, decimal, hex, and base 60, as allowed in the YAML
specification; see http://yaml.org/type/int.html. Adds unit tests for each
of these bases as well.
I have a simple class with one int property:
I try to deserialize the following YAML file:
...using the following code:
I would expect
obj.TestField
to have a value of 16. However, an exception is thrown during deserialization, when trying to parse"0x10"
inScalarNodeDeserializer.cs
:It seems that the possibility of having a non-decimal base is being ignored. Many integer bases (binary, octal, hexadecimal and sexagesimal) should be allowed per the YAML spec. For reference, this works as expected in
pyyaml
:The text was updated successfully, but these errors were encountered: