go-yaml / yaml

YAML support for the Go language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid yaml data portion parsed with no error

jl945 opened this issue · comments

commented

I do not know the user configuration content such as yaml parsing string {"aa":aaaa}{"tt":tt} then aa: aaaa will appear buttt has no result and no parsing error, can I force not to discard data

{"aa":aaaa}
---
{"tt":tt}"

or

{
  "aa":aaaa
  "tt":tt
}

are valid yaml documents. {"aa":aaaa}{"tt":tt} has two root elements.

commented

Thank you for your reply, but what I want to express is that the default value is given instead of error after parsing some incorrect data. I have been concerned about the same situation on this issue #938