mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-14 04:25:36 +00:00
Added docs on yes/no being strings in yaml spec 1.2
This commit is contained in:
parent
e0558d4b9b
commit
d0ccd7c8c8
@ -26,6 +26,24 @@ will output
|
||||
true
|
||||
```
|
||||
|
||||
## "yes" and "no" are strings
|
||||
In the yaml 1.2 standard, support for yes/no as booleans was dropped - they are now considered strings. See '10.2.1.2. Boolean' in https://yaml.org/spec/1.2.2/
|
||||
|
||||
Given a sample.yml file of:
|
||||
```yaml
|
||||
- yes
|
||||
- no
|
||||
```
|
||||
then
|
||||
```bash
|
||||
yq '.[] | tag' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
!!str
|
||||
!!str
|
||||
```
|
||||
|
||||
## `and` example
|
||||
Running
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user