Closed tanelso2 closed 1 year ago
It is a known shortcoming that NimYAML doesn't see inherited fields. This was briefly discussed in #130, but a separate issue for it didn't exist yet, so this is the issue for this problem now.
Background: NimYAML currently queries the type definition AST for discovering its fields. This is required for features like properly supporting case
in types. However inherited fields are not part of the AST of the target type definition, hence they are currently not processed.
I pushed a commit that handles your test case. I am not quite confident that it works in all scenarios, and dumping is yet to be done, but you can play around with it by installing yaml@#head
.
Fixed in NimYAML 2.0.0.
Hi, NimYAML gives me an error when trying to deserialize a simple object in the code below. It only seems to understand the fields that are directly defined on the type and not any parent types.
Code:
Output: