Skip to content

Embedded structs are showing up in the yaml #804

@ghostsquad

Description

@ghostsquad

Describe the bug
the name of an embedded struct shows up in the resulting yaml. This should not occur. The below playground shows the difference between goccy/go-yaml and encoding/json.

To Reproduce

https://go.dev/play/p/tIYvGgf9qiR

Expected behavior
The embedded struct's name does not show up the output, only it's fields.

Screenshots
If applicable, add screenshots to help explain your problem.

Version Variables

  • Go version: 1.25
  • go-yaml's Version: v1.18.0

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions