DEV Community

Discussion on: YAML (and JSONC) failed as a data transfer format with comments

 
patarapolw profile image
Pacharapol Withayasakpunt

yaml.dump(yaml.load($string)), and comments are lost.

Thread Thread
 
stevepryde profile image
Steve Pryde

Ah ok. Yes I can see why this would be annoying.

I believe there are yaml parsers that do preserve comments but probably not for every language.