Tagged articles
2 articles
Page 1 of 1
Go Programming World
Go Programming World
Aug 4, 2025 · Backend Development

Why Go’s yaml.v3 Fails to Convert YAML with Duplicate Keys to JSON (and How to Fix It)

This article explains why converting a YAML document containing both numeric and string keys (e.g., 1 and "1") to JSON fails in Go using yaml.v3, demonstrates the resulting errors, and shows how to resolve the issue with dyno.ConvertMapI2MapS or alternative libraries, while also comparing behavior in Python and JavaScript.

Data ConversionGoJSON
0 likes · 17 min read
Why Go’s yaml.v3 Fails to Convert YAML with Duplicate Keys to JSON (and How to Fix It)
FunTester
FunTester
Oct 24, 2024 · Backend Development

Using gopkg.in/yaml.v3 for YAML Parsing and Generation in Go

This article introduces the YAML format, outlines its syntax rules, and demonstrates how the Go library gopkg.in/yaml.v3 can be used for parsing and generating YAML files, including basic examples, advanced struct mapping, and a summary of its key advantages for backend development.

GoYAMLparsing
0 likes · 9 min read
Using gopkg.in/yaml.v3 for YAML Parsing and Generation in Go