Closed bartoszjklimek closed 7 months ago
@bartoszjklimek Thanks for letting me know about this issue.
Unfortunately, I concluded a long time ago that converting JSON to YAML is really difficult, and that therefore handling every corner case is beyond the scope of JsonTools. That is why, whenever someone uses that plugin command, I have the message box warning the user that the conversion may not work as intended.
I'm not going to fix this issue, because correctly handling every corner case would probably require several thousand lines of code and there are plenty of other ways to convert JSON to YAML. If you would like, I can add a unit test so that most recent errors.txt reflects the fact that JsonTools breaks in this case.
As noted in the docs, a good way to convert YAML to JSON would be to use PyYAML
I'm trying to convert a JSON schema file to a YAML file. Unfortunately strings beginning with # are not quoted and therefore interpreted as comments. E.g. for such JSON fragment:
the following YAML fragment is generated:
The expected result would be:
I'm using Notepad++ v8.6.5 and JSON Tools 7.1.