FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
YAML to JSON Conversion: The Gotchas That Break Your Config Files
How-ToWeb Development

YAML to JSON Conversion: The Gotchas That Break Your Config Files

via Dev.to WebdevMichael Lip3h ago

YAML and JSON represent the same data structures: objects, arrays, strings, numbers, booleans, and null. Converting between them should be straightforward. In practice, YAML has several features and quirks that make the conversion surprisingly treacherous. The Norway problem YAML automatically interprets certain strings as non-string types: country : NO You expect: {"country": "NO"} . You get: {"country": false} . YAML interprets "NO" as a boolean false. Similarly, "YES" becomes true, "on" becomes true, "off" becomes false. This is the "Norway problem" -- representing the country code for Norway (NO) in YAML requires quoting: country: "NO" . Other surprising type coercions: version : 1.0 # Becomes number 1, not string "1.0" version : 1.10 # Becomes number 1.1, not string "1.10" octal : 0777 # Becomes decimal 511 in YAML 1.1 date : 2024-01-15 # Becomes a Date object, not a string The version: 1.10 case is particularly dangerous. You expect the string "1.10" but get the number 1.1. In a

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
0 views

Related Articles

Tutorials Are Lying to You Here’s What Actually Works ?
How-To

Tutorials Are Lying to You Here’s What Actually Works ?

Medium Programming • 2h ago

Flutter Mistakes That Make Apps Slow ⚡
How-To

Flutter Mistakes That Make Apps Slow ⚡

Medium Programming • 2h ago

Welcome Thread - v370
How-To

Welcome Thread - v370

Dev.to • 2h ago

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories
How-To

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories

Dev.to Beginners • 2h ago

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers
How-To

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers

Dev.to Beginners • 3h ago

Discover More Articles