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

How is that different from other formats? Take JSON:

    {"python_versions": [3.8, 3.9, 3.10]}
This is a problem in any config language that doesn't enforce types, and jf it does enforce types, you should've used quotes already (like you really should've been before 3.10 was added to the list).

Similar problems also exist in many config formats with scientific notation (2e345) or hexadecimal notation (0x12345) or octal notation (012345, no that's not a decimal number in many programming languages and config formats!).

What commonly supported alternative would you suggest for this use case?



The difference from JSON is that in JSON, you always have to write "" to get strings.

In YAML you can just write blah and and it becomes a string. Except when it doesn't, when it matches some other type of value.


Sure, if you ignore what the YAML documentation actually says.




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

Search: