How can I emit comments in a YAML document using Psych? [duplicate]

一个人想着一个人 提交于 2019-11-28 09:43:16

问题


I want to generate a YAML document with some comments between sequence elements but I can't really figure out how to do this. Any pointers?


回答1:


You can’t emit YAML documents containing comments with Psych. Psych basically dumps a Hash, and you can’t have comments in a Hash either.



来源:https://stackoverflow.com/questions/16889044/how-can-i-emit-comments-in-a-yaml-document-using-psych

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!