News for hackers. Stuff that matters.

Funny YAML Gotcha

$ cat foo.rb require 'yaml'

p YAML.load(<<~YML) vat_rates: dk: 0.25 no: 0.25 se: 0.25 YML $ ruby foo.rb {"vat_rates"=>{"dk"=>0.25, false=>0.25, "se"=>0.25}}

( 2 comments | on HN )
Re:Funny YAML Gotcha by pukkaone on Monday January 04, 2021 @12:37PM (#25634905)
Long time YAML practitioners know this as the Norway problem[1].

[1]: https://news.ycombinator.com/item?id=17359376

Re:Funny YAML Gotcha by verdverm on Monday January 04, 2021 @07:48PM (#25640493)
time for some https://cuelang.org?