3 ms·
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
by hgomersall 2y ago
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.
- vander_elst 2y agoIf you have a schema, why not using directly something like protobufs?
- LelouBil 2y agoThe comment you replied to talks about human readable configs
- Mesopropithecus 2y agoLike this? https://protobuf.dev/reference/protobuf/textformat-spec/ https://protobuf.dev/reference/protobuf/textformat-spec/
- mdaniel 2y agohttps://protobuf.dev/reference/protobuf/textformat-spec/#:~:text=this%20is%20a%20draft%20spec%20reverse-engineered%20from%20the%20c%2B%2B%20text%20format 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