Skip to content
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

Roundtrip comments in YAML <-> JSON(C) Converter #1030

Open
damianpowell opened this issue Jan 19, 2024 · 0 comments
Open

Roundtrip comments in YAML <-> JSON(C) Converter #1030

damianpowell opened this issue Jan 19, 2024 · 0 comments
Labels
enhancement Idea of improvement of existing feature. untriaged

Comments

@damianpowell
Copy link

damianpowell commented Jan 19, 2024

What improvement do you think would an existing feature or tool in DevToys?

Allow roundtripping of comments between YAML (#) and JSON(C) (//).

Solution/Idea

  • There should be an option to strip comments from JSONC files (thereby making them compliant JSON files) but this should be disabled by default in order to avoid information loss from the comments).
  • Multi-line comments in JSONC should be converted to multiple single-line comments in YAML.
  • Multiple single-line comments in YAML should be converted to multiple single-line comments in JSONC, by default. There should be an option to convert them to multi-line comments. For this setting to be effective, the single line comments must be the only thing that appears on the line and they must all match the regular expression ^(\s*)# and the content of the first capture group ($1) must be the same for each line.

Comments

No response

@damianpowell damianpowell added enhancement Idea of improvement of existing feature. untriaged labels Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea of improvement of existing feature. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant