go-yaml / yaml

YAML support for the Go language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YAML parsing is not as expected

RedCrazyGhost opened this issue · comments

In theory, data in json format should not be parsed into data in a structure.

image

This problem was discovered when I was writing gin test cases. (See Issue)

This sounds correct?

YAML (from 1.2 onward at least) is supposed to be a superset of JSON, so it makes sense that this would parse.

That's right. I saw something similar at Red Hat
Red Hat - What is YAML?