-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
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
Add Comments to Yaml #57
Comments
A proof of concept would be here in the save() method. |
Actually my "yaml writer" only exists to unwrap Supporting comments in yaml would indeed be very nice, both in reading and writing. However that would require more work and isn't a top priority, I'll add it to the backlog. |
I created my own custom implementation of this, if you are interested I can also PR it, however It's not the most efficient code and I'm nearly positive it can be improved. |
Yep I'm interested. I would have liked to be able to read and write comments in order to preserve the configs but just writing comments is better than nothing 😃 |
|
Is this still being considered? |
It is, but it won't be ready before several months because it requires some work. I know the snakeyaml's limitation is problematic. |
Any updates on this? |
Not yet, I would have to write a new yaml parser 😅 |
I'm aware of SnakeYaml not supporting comments during the parse, however since you have your own yaml writer you can definitely support outputting comments, you would just need to bridge the YamlCommentedConfiguration's comment Map to your Writer and then when writing line for line, check if it's a node, if it is a node, add said comment for said node. Obviously you also need to calculate things such as Whitespace e.t.c and it wouldn't be the easiest solution, but it would allow for Comment output on Yaml
The text was updated successfully, but these errors were encountered: