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
I have a yaml file.
--- Name: aaa Age: 12 Props: "text/html": a
And I have a class.
public class YamlData { public string Name { get; set; } public int Age { get; set; } public Dictionary<string, string> Props { get; } = new Dictionary<string, string>(); }
Specially, YamlData.Props dictionary has only get accessor.
YamlData.Props
For deserializing,
var deserializerBuilder = new DeserializerBuilder() .IgnoreUnmatchedProperties() .Build(); var data = deserializerBuilder.Deserialize<YamlData>(File.ReadAllText("test.yaml"));
data.Props dictionary count is zero. if I put the set on Props property, It is well. But I can not change the YamlData.Props in code.
data.Props
set
Props
How to resolve these problem?
The text was updated successfully, but these errors were encountered:
I believe this is fixed now with no comments in over 4 years. Closing it. If you still have problems open a new issue.
Sorry, something went wrong.
No branches or pull requests
I have a yaml file.
And I have a class.
Specially,
YamlData.Props
dictionary has only get accessor.For deserializing,
data.Props
dictionary count is zero.if I put the
set
onProps
property, It is well.But I can not change the
YamlData.Props
in code.How to resolve these problem?
The text was updated successfully, but these errors were encountered: