You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am actually really struggling to understand the YAML 1.2 spec here, but I think it's saying that a parser can be in one of two modes: JSON schema tag resolution, or core schema tag resolution (with core seemingly being recommended as a default). https://yaml.org/spec/1.2.2/#1022-tag-resolution
From my reading:
In the JSON schema tag resolution, True indeed should be interpreted as "True"; but
in the core schema tag resolution, True should be interpreted as true.
In any case, my colleagues used to YAML 1.1 were taken by surprise when True wasn't working for them. I am not sure what the right answer is here, but I suspect these boolean literals should still be treated as valid booleans.
The text was updated successfully, but these errors were encountered:
AFAIK the yaml 1.2 spec is smaller and more strict than 1.1. That's why a number of different representations for true and false are now treated as strings (including yes and no). The reference you provide is really curious, I haven't found any reference about how to communicate to the parser which schema to follow. How would I mark a document/value to be understood as JSON schema tag resolution or core schema tag resolution?
This repo is basically unmaintained. I would recommend moving this discussion to a new issue in https://github.com/Ethiraric/yaml-rust2 where it'll have a better chance of resulting in improvements.
yaml-rust/src/yaml.rs
Lines 307 to 308 in da52a68
I am actually really struggling to understand the YAML 1.2 spec here, but I think it's saying that a parser can be in one of two modes: JSON schema tag resolution, or core schema tag resolution (with core seemingly being recommended as a default).
https://yaml.org/spec/1.2.2/#1022-tag-resolution
From my reading:
True
indeed should be interpreted as"True"
; butTrue
should be interpreted astrue
.In any case, my colleagues used to YAML 1.1 were taken by surprise when
True
wasn't working for them. I am not sure what the right answer is here, but I suspect these boolean literals should still be treated as valid booleans.The text was updated successfully, but these errors were encountered: