We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using a complex key, that has newline char the serialization is successful but deserialization fails.
YAML example:
? >- key a b : >- value a b
Code:
using YamlDotNet.Serialization; var serializer = new SerializerBuilder().Build(); var deserializer = new DeserializerBuilder().Build(); var data = new Dictionary<string, string>(); data.Add("key\na\nb", "value\na\nb"); var serialized = serializer.Serialize(data); var deserialized = deserializer.Deserialize<Dictionary<string, string>>(serialized);
The version of the YamlDotNet package that I'm using is 11.2.1.
YamlDotNet
11.2.1
Exception:
(Line: 1, Col: 1, Idx: 0) - (Line: 1, Col: 1, Idx: 0): Exception during deserialization -> Value cannot be null. (Parameter 'key')
The text was updated successfully, but these errors were encountered:
I'm going to see if this is even valid yaml, It still throws in the latest code, however the following works:
? >- key a b: >- value a b
Notice where the :, on the same line as b. I'll let you know what I find out.
:
b
Sorry, something went wrong.
K, it is valid, digging in to the code to determine why it's failing.
This fix will go out in the next release.
Successfully merging a pull request may close this issue.
When using a complex key, that has newline char the serialization is successful but deserialization fails.
YAML example:
Code:
The version of the
YamlDotNet
package that I'm using is11.2.1
.Exception:
The text was updated successfully, but these errors were encountered: