Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Boolean support inconsistent with the YAML 1.2 spec #214

@fabianofranz

Description

@fabianofranz

The YAML 1.1 spec explicitly supported unquoted values like "on/off" or "yes/no" as booleans, so the sample below would translate the third element of command to false:

command:
  - redis-server
  - '--appendonly'
  - no

However these boolean representations were dropped in 1.2 as one of the major changes in the spec, in favour of just true or false to represent booleans.

This change is not represented in the go-yaml library, which still supports all previous forms of booleans. I understand it's a claim of the project that it supports most of 1.1 and 1.2, however for larger spec changes like this one, it would be important to have the ability to choose if I want to stick to the 1.2 behavior for booleans, and have the no element in the example above translated to the string "no".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions