This question is an exact duplicate of:
- Adding comment to YAML programmatically 1 answer
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?
This question is an exact duplicate of:
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?
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.