3 ms·
YAML has tons of warts like this. https://yaml.org/type/bool.html https://yaml.org/type/bool.html This should be used in schools as an example to illustrate h
by foobiekr 7y ago
YAML has tons of warts like this.
https://yaml.org/type/bool.html https://yaml.org/type/bool.html
This should be used in schools as an example to illustrate how not to do things.
- sitkack 7y agoEvery feature is a source of bugs. Be careful when constructing end user affordances for systems that have broad applicability and need to run over a very long time span.
- Groxx 7y agoAlso as an example of "always deserialize to known types". Flexible boolean values can be convenient since it's relatively human-readable, but "deserialize into [whatever the heck you think is appropriate]" is a problem for quite a few reasons beyond confusion: https://lgtm.com/blog/swagger_snakeyaml_CVE-2017-1000207_CVE-2017-1000208 https://lgtm.com/blog/swagger_snakeyaml_CVE-2017-1000207_CVE... (same techniques have been used against other kinds of serialization in many languages for many years)