# goccy/go-yaml

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/goccy-go-yaml).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

2,189 stars · 223 forks · Go · MIT

## Links

- GitHub: https://github.com/goccy/go-yaml
- Homepage: https://goccy.github.io/go-yaml
- awesome-repositories: https://awesome-repositories.com/repository/goccy-go-yaml.md

## Topics

`go` `golang` `golang-library` `yaml` `yaml-parser`

## Description

This library is a Go-based utility for encoding and decoding YAML data into native language structures. It facilitates the transformation of complex objects into human-readable text formats and provides mechanisms for mapping data fields through reflection and custom type handling.

The library distinguishes itself by maintaining an intermediate abstract syntax tree, which allows for precise document modifications and the preservation of comments during serialization. It includes a path-based query engine that enables users to navigate, filter, and update document hierarchies without manual iteration, as well as support for resolving external references across multiple files.

Beyond core parsing and serialization, the project offers comprehensive tools for document manipulation, including recursive tree traversal and tag-driven formatting controls. It also provides diagnostic utilities that generate descriptive, colorized error messages with specific source location data to assist in debugging.

## Tags

### Part of an Awesome List

- [Multi-Format Encoder-Decoder Abstractions](https://awesome-repositories.com/f/awesome-lists/data/data-formats-and-parsing/image-format-decoders-and-encoders/multi-format-encoder-decoder-abstractions.md) — Transforms native language structures into formatted YAML text and parses documents back into objects using automated field mapping. ([source](https://github.com/goccy/go-yaml#readme))

### Data & Databases

- [YAML Parsers](https://awesome-repositories.com/f/data-databases/data-serialization-formats/data-formats/yaml-parsers.md) — Encodes and decodes YAML data into native structures with support for path-based queries and custom serialization logic.
- [YAML Data Serialization](https://awesome-repositories.com/f/data-databases/yaml-data-serialization.md) — Converts native language objects into human-readable text format to simplify data storage and transmission.
- [Custom Serialization Interfaces](https://awesome-repositories.com/f/data-databases/data-type-managers/dynamic-type-managers/custom-type-serializers/custom-serialization-interfaces.md) — Enables defining custom conversion logic for specific data types to control marshaling and unmarshaling behavior. ([source](https://github.com/goccy/go-yaml#readme))
- [Custom-Type Mappings](https://awesome-repositories.com/f/data-databases/naming-conventions/struct-field-mappings/struct-to-struct-copiers/custom-type-mappings.md) — Defines specific conversion behavior for complex data types to control information representation during marshaling and unmarshaling.

### Programming Languages & Runtimes

- [Go Data Mapping Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/go-data-mapping-libraries.md) — Provides a utility for mapping complex data structures to and from text formats using reflection and custom type handling.

### Software Engineering & Architecture

- [Reflection-Based Data Mapping](https://awesome-repositories.com/f/software-engineering-architecture/metadata-attachments/struct-tags/reflection-based-type-mapping/reflection-based-data-mapping.md) — Uses runtime reflection to automatically bind document fields to native language structures during serialization.
- [Path-Based Query Engines](https://awesome-repositories.com/f/software-engineering-architecture/path-based-query-engines.md) — Provides a path-based query engine to navigate and update complex document hierarchies without manual iteration.
- [Serialization Control](https://awesome-repositories.com/f/software-engineering-architecture/annotation-driven-configuration/serialization-control.md) — Uses metadata annotations on data structures to define custom formatting and field mapping behavior.
- [YAML Configuration Files](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files.md) — Parses and manipulates structured configuration files to allow for programmatic access and easy updates to application settings.
- [YAML Serializers](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-formats-and-schemas/yaml-configuration-files/yaml-serializers.md) — Transforms objects into human-readable YAML text while maintaining comments and precise formatting control.
- [Serialization Error Reporters](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/parse-error-reporters/serialization-error-reporters.md) — Provides descriptive, colorized error messages with precise source location data during YAML serialization and deserialization processes. ([source](https://github.com/goccy/go-yaml#readme))
- [External Style Reference Resolution](https://awesome-repositories.com/f/software-engineering-architecture/external-style-reference-resolution.md) — Integrates anchors and elements defined in separate files during decoding to maintain consistency across related documents. ([source](https://github.com/goccy/go-yaml/blob/master/README.md))

### Business & Productivity Software

- [Document Content Manipulation](https://awesome-repositories.com/f/business-productivity-software/document-content-manipulation.md) — Filters, replaces, and merges document elements using path-based queries and recursive processing to update complex data structures. ([source](https://github.com/goccy/go-yaml#readme))

### Development Tools & Productivity

- [Document Node Modeling](https://awesome-repositories.com/f/development-tools-productivity/ast-based-navigation/document-node-modeling.md) — Maintains an internal abstract syntax tree to enable precise document modifications and comment preservation during serialization.
- [Automated Document Processing](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-automation-systems/automation/automated-document-processing.md) — Automates document maintenance and transformation tasks by filtering, merging, and updating complex data structures.

### DevOps & Infrastructure

- [Anchor Resolution in Merging](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/file-based-configuration/configuration-file-loading/configuration-merging/yaml/anchor-resolution-in-merging.md) — Integrates anchors and elements defined in separate files during decoding to maintain consistency across related data documents.
