This question already has an answer here:

Adding comment to YAML programmatically
(1个答案)
我想在序列元素之间生成一个带有一些注释的yaml文档,但是我真的不知道怎么做。有什么线索吗?

最佳答案

不能发出包含Psych注释的YAML文档Psych基本上会转储一个散列,并且在散列中也不能有注释。

关于ruby - 如何使用Psych在YAML文档中发出评论? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16889044/

10-16 18:47