Seeking guidance reading .yaml files with C#

前端 未结 3 863
长发绾君心
长发绾君心 2021-01-18 08:37

Two months later: The YAML (Eve Online blueprint.yaml) file I tried to parse changed a huge deal which also made it much easier to parse using de deserializer. If someone (f

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-18 08:44

    You have too much stuff going on in one line of code. Create a new YamlScalarNode object in one line, access the array in another line, cast the resultant object in another line. That way, you'll narrow down the problem area to a single step.

    The message is telling you that you are retrieving a YamlMappingNode from the array but you are casting it to a YamlSequenceNode. Which is not allowed since the two types are obviously not related.

提交回复
热议问题