Skip to content

feat/output-without-quoted-strings#27

Merged
p-mcgowan merged 1 commit intomainfrom
feat/output-without-quoted-strings
Apr 28, 2025
Merged

feat/output-without-quoted-strings#27
p-mcgowan merged 1 commit intomainfrom
feat/output-without-quoted-strings

Conversation

@p-mcgowan
Copy link
Collaborator

@p-mcgowan p-mcgowan commented Apr 28, 2025

  • added -Q, --no-quote to output string values without quotes.

NOTE: this will not be guaranteed to produce valid YAML, as the string quoting requirements are non-trivial and out of scope for the feature.

See https://stackoverflow.com/a/22235064 (and the comments) about why quoting by default is preferred.

If, some time in the future, we want to make this more robust then we would want to take another look here and build a yaml validation thing. But that's not really worth doing since it requires maintenance if the spec changes, and it's extra work for the lib that is more easily just avoided by quoting all fields (unquoted can be considered a cosmetic feature here).

- added -Q, --no-quote to output string values without quotes.

NOTE: this will not be guaranteed to produce valid YAML, as the string
quoting requirements are non-trivial and out of scope for the feature.

See https://stackoverflow.com/a/22235064 (and the comments) about why
quoting by default is preferred.
@p-mcgowan p-mcgowan merged commit 341bcf2 into main Apr 28, 2025
3 checks passed
@p-mcgowan p-mcgowan deleted the feat/output-without-quoted-strings branch April 28, 2025 22:47
@p-mcgowan p-mcgowan mentioned this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant