Open marnikvd opened 1 year ago
Hey thanks for your feedback :+1:
Keeping comments between editions seems impossible as they're implicitely dumped by the scanner.
The topic is still open, missing features are whitespace preservation and comment token/event handling.
Moreover, editing YAML without ArduinoJson requires a libyaml C++ wrapper with a real iterator and accessors.
Good news is pure-libyaml manipulation was on the roadmap of this project, so I can go halfway and integrate this C++ libyaml wrapper as a start, then see what happens to existing comments after editing the yaml.
Going any further will mean contributing the upstream libyaml project, and the test suite is really scary :)
[edit] libyaml-cpp didn't help, the problem is in yaml design and libyaml minimalism.
more info in this SO post
Hello,
The reason why I prefer to use YAML is the ability to use comments. So my question is : Since JSON doesn't support comments, how can I serializeYml() with comments?
I know you can deserialize a YAML with comments to a JsonObject, but I guess you loose the comments.
I want to :