go-yaml icon indicating copy to clipboard operation
go-yaml copied to clipboard

Ast unexpected maping value while using comment inside json flow

Open Ghibranalj opened this issue 1 year ago • 1 comments

This valid yaml gives out an error when parsed with parser.ParseBytes()

cursor: {
    # something
    style: beam,
}

Error message

2022/07/31 17:34:11 [2:5] unexpected mapping key
       1 | cursor: {
    >  2 |     # something
               ^
       3 |     style: beam,
       4 | }

Edit: This online yaml parser parses it correctly here.

Ghibranalj avatar Jul 31 '22 15:07 Ghibranalj

😭

Ghibranalj avatar Dec 12 '23 06:12 Ghibranalj