Registry / serialization / yaml-v2

yaml-v2

JSON →
library2.4.0gogounverified

Package yaml implements YAML support for the Go language.

go get gopkg.in/yaml.v2
INSTALL
IMPORT
SIG · YAML-V2
Y
yaml-v2
serializationgov2.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

yaml
gopkg.in/yaml.v2

Marshal a map to YAML

package main import ( "fmt" "gopkg.in/yaml.v2" ) func main() { data := map[string]string{"key": "value"} out, _ := yaml.Marshal(data) fmt.Println(string(out)) }
Debug
Known issues
gotchav2 is legacy; v3 has breaking changes
fix
Consider migrating to gopkg.in/yaml.v3 for new projects
affects: >=2.0.0
Upgrade
Version history
2.4.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
45 hits · last 30 days
node
42
Resources
yaml-v2 — go get yaml-v2 · libregistry