-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
Added option to quote YAML 1.1 boolean strings #738
Conversation
In my opinion such an option just for booleans doesn't make much sense. Not only booleans have changed between YAML 1.1 and 1.2, but also numbers. Have a look here for a compact comparison: https://perlpunk.github.io/yaml-test-schema/schemas.html |
Thank you @perlpunk, I have updated the code to hopefully include all YAML 1.1 scalar styles. |
a0f8359
to
78b1ab3
Compare
I’m going to review this in the next few days so we can get it moving through. In the meantime, you’ll need to rebase from master to fix the merge conflicts. |
I merged my fork with upstream, thank you for your time! |
The build hit the random bug during build. Can you push up another commit so it attempts a build again? |
To be fair, I noticed all previous builds ended with the same |
Instead of using master as your branch, try using a different branch name. It may be getting confused about having 2 master branches. |
I renamed my main branch and had to open a new pull request (#767), which did build successfully. |
This pull request addresses issue #737.
I added an optional parameter to
SerializerBuilder.WithQuotingNecessaryStrings
to opt into treating YAML 1.1 boolean strings like"Yes"
,"no"
,"ON"
,"Off"
as special strings that need to be quoted. Specification is here.I also refactored the special strings regex to be compiled once at the construction of
TypeAssigningEventEmitter
.