Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Instead you have YAML you have to debug because all of a sudden you have decided to support Norway as a country and something about Norway's country code and the way YAML handles Boolean values bites you in the ass.


I was curious enough to Google and found [1]. It turns out YAML supports figuring out the type of a value from the plain value itself. Norway's cc is "NO", which parses as a Bool instead of a string.

The solution is to always quote strings.

[1] https://medium.com/@lefloh/lessons-learned-about-yaml-and-no...




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: