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 encountered the following yaml document in the wild:
nodeGroups: - <<: &node-shared privateNetworking: true ssh: allow: true # will use ~/.ssh/id_rsa.pub as the default ssh key name: ng-1 instanceType: t3.medium desiredCapacity: 1 - name: ng-2 <<: *node-shared instanceType: t3.small desiredCapacity: 2 maxSize: 3 minSize: 1
Parsing and printing it with:
println!("{:#?}", yaml_rust::YamlLoader::load_from_str(example).unwrap()[0]);
on yaml-rust v0.4.4 yields something odd:
Hash( { String( "nodeGroups", ): Array( [ Hash( { String( "<<", ): Hash( { String( "privateNetworking", ): Boolean( true, ), String( …
Notice the String("<<")?
String("<<")
Is that a bug in the parser, or is that document simply not valid YAML 1.2?
The text was updated successfully, but these errors were encountered:
you cannot alias/anchor an array on yaml - see yaml/yaml#35
Sorry, something went wrong.
Oh, woops, this issue was still open...
cf. dtolnay/serde-yaml#163 (comment), Merge keys are not part of Yaml 1.2, and simply not supported. So no, this isn't a bug.
@cilindrox If you check the debug output above, the "<<" are inside of a Hash. It has nothing to do with arrays.
"<<"
Hash
No branches or pull requests
I encountered the following yaml document in the wild:
Parsing and printing it with:
on yaml-rust v0.4.4 yields something odd:
Notice the
String("<<")
?Is that a bug in the parser, or is that document simply not valid YAML 1.2?
The text was updated successfully, but these errors were encountered: