awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

Go YAML Libraries

Ranking updated Jul 13, 2026

For a library for parsing YAML in Go, the first results are go-yaml/yaml (This library is the standard, high-performance tool for YAML serialization and deserialization in Go, offering robust struct mapping, custom marshaling interfaces, and built-in security protections against resource exhaustion), goccy/go-yaml (This library provides high-performance YAML parsing and serialization for Go with full support for struct marshalling and custom type handling, making it a standard choice for YAML manipulation) and mitchellh/mapstructure (This library is a reflection-based tool for mapping generic map data to Go structs, but it does not perform YAML parsing or serialization itself). knadh/koanf and itchyny/gojq round out the shortlist. Compare the match explanations and check the project documentation against your requirements.

We curate open-source GitHub repositories matching “best go yaml libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.

Go YAML Libraries

Find the best repos with AI.We'll search the best matching repositories with AI.
  • go-yaml/yamlgo-yaml avatar

    go-yaml/yaml

    7,023View on GitHub↗

    This library is a YAML encoder and decoder for native Go data structures. It provides the tools necessary to transform internal data into YAML formatted text and convert YAML input streams back into structured data. The parser includes built-in protections against resource exhaustion attacks by enforcing limits on document depth and alias resolution. It also ensures deterministic output by employing consistent key sorting for maps. The project covers serialization and deserialization workflows, including struct mapping and custom marshaling interfaces. It also handles input encoding detectio

    This library is the standard, high-performance tool for YAML serialization and deserialization in Go, offering robust struct mapping, custom marshaling interfaces, and built-in security protections against resource exhaustion.

    GoYAML Parsers
    View on GitHub↗7,023
  • goccy/go-yamlgoccy avatar

    goccy/go-yaml

    2,189View on GitHub↗

    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 it

    This library provides high-performance YAML parsing and serialization for Go with full support for struct marshalling and custom type handling, making it a standard choice for YAML manipulation.

    GoYAML ParsersYAML Serializers
    View on GitHub↗2,189
  • mitchellh/mapstructuremitchellh avatar

    mitchellh/mapstructure

    8,033View on GitHub↗

    mapstructure is a reflection-based library for the bidirectional encoding and decoding of generic map data into native typed Go structures. It functions as a tool for transforming loosely typed map values into specific structs and encoding those structs back into maps. The library utilizes Go reflection to map generic data keys to struct fields during runtime. It supports the transformation of untyped data from dynamic sources or configuration files into type-safe native structures. The mapping process includes recursive traversal of nested maps and slices, as well as the use of struct tags

    This library is a reflection-based tool for mapping generic map data to Go structs, but it does not perform YAML parsing or serialization itself.

    GoReflection-Based Unmarshallers
    View on GitHub↗8,033
  • knadh/koanfknadh avatar

    knadh/koanf

    3,871View on GitHub↗

    koanf is a configuration management library for Go designed to load, merge, and unmarshal application settings from multiple sources into structured objects. It functions as a multi-source config loader that aggregates data from environment variables, files, and remote providers into a single unified map. The system utilizes a pluggable architecture for parsing and data abstraction, allowing it to transform bytes from formats such as JSON, YAML, and TOML into nested maps. It supports dynamic configuration watching to monitor external sources and trigger automatic reloads when settings change.

    This is a configuration management library that uses YAML parsers as a plugin, rather than a dedicated YAML parsing and manipulation library for general-purpose use.

    GoReflection-Based Unmarshallers
    View on GitHub↗3,871
  • itchyny/gojqitchyny avatar

    itchyny/gojq

    3,770View on GitHub↗

    gojq is a JSON query engine and transformation tool implemented in Go. It serves as a Go language port of the jq command, providing a library for embedding JSON and YAML manipulation capabilities directly into Go applications. The tool functions as an arbitrary-precision JSON processor, performing mathematical operations on large integers to prevent precision loss or numeric overflow during data transformations. Its broader capabilities include filtering and reshaping structured data using a specialized query language, converting between YAML and JSON formats, and formatting date and time st

    This is a JSON and YAML transformation and query engine rather than a general-purpose library for parsing, struct marshalling, and serializing YAML data in Go applications.

    GoYAML Serializers
    View on GitHub↗3,770
  • danielgtaylor/humadanielgtaylor avatar

    danielgtaylor/huma

    4,170View on GitHub↗

    Huma is an OpenAPI REST framework for Go designed for building HTTP services with automatic OpenAPI 3.1 specification generation and JSON Schema validation. It serves as a toolkit for developing REST and RPC APIs with typed inputs and outputs, deriving interactive documentation directly from the source code. The framework distinguishes itself by automating the synchronization between implementation and documentation. It uses a content-negotiation engine to manage multiple serialization formats via client headers and employs a JSON Schema input validator to automatically verify request paramet

    This is a REST API framework for building HTTP services, not a dedicated library for parsing or manipulating YAML data.

    GoStruct Tag Binding
    View on GitHub↗4,170
  • spf13/viperspf13 avatar

    spf13/viper

    30,306View on GitHub↗

    Viper is a configuration management library designed to centralize application settings from diverse sources into a unified, type-safe registry. It aggregates data from local files, environment variables, command-line flags, and remote key-value stores, providing a single source of truth for application state. By utilizing a hierarchical key-value registry, the system resolves configuration values based on a prioritized stack of providers, ranging from default values to runtime overrides. The library distinguishes itself through its pluggable provider abstraction and dynamic update capabiliti

    Viper is a configuration management framework that uses YAML parsers internally, but it is not a dedicated YAML library for general-purpose parsing, manipulation, and serialization.

    GoReflection-Based Unmarshallers
    View on GitHub↗30,306
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
go-yaml/yaml7KGoNOASSERTIONApr 1, 2025
goccy/go-yaml2.2KGoMITApr 11, 2026
mitchellh/mapstructure
8K
Go
MIT
Jun 25, 2024
knadh/koanf3.9KGomitFeb 19, 2026
itchyny/gojq3.8KGoMITJun 12, 2026
danielgtaylor/huma4.2KGoMITJun 5, 2026
spf13/viper30.3KGoMITJan 12, 2026

Related searches

  • a library for parsing YAML in Rust
  • a java library for parsing yaml files
  • a library for parsing YAML in C#
  • a configuration loading library for Go applications
  • a data validation library for Go
  • a library for parsing csv in Go
  • a high performance JSON library for Go
  • a high performance serialization library for Go