transclusion

How can I include a YAML file inside another?

喜你入骨 提交于 2019-11-26 07:23:46
问题 So I have two YAML files, \"A\" and \"B\" and I want the contents of A to be inserted inside B, either spliced into the existing data structure, like an array, or as a child of an element, like the value for a certain hash key. Is this possible at all? How? If not, any pointers to a normative reference? 回答1: No, YAML does not include any kind of "import" or "include" statement. 回答2: Your question does not ask for a Python solution, but here is one using PyYAML. PyYAML allows you to attach