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

IMO the proposed solution of StrictYAML + schema is the right one here and what we use extensively for human readable configs. StrictYAML (linked to in the post) is essentially a string-type-only restriction of YAML, so you impose your type coercion on the parsed data structure.



If you have a schema, why not using directly something like protobufs?


The comment you replied to talks about human readable configs



https://protobuf.dev/reference/protobuf/textformat-spec/#:~:...

and, setting that aside, the very next paragraph says that this is a legit representation of -2.0 which means something has gone gravely wrong

  value: -
    # change this to 3.14 one day
    2.0




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: