Hacker News new | past | comments | ask | show | jobs | submit login

The way to solve YAML issues is to invent some widely used yaml pretty printer and shout at everyone not using it.

There's `yq -P` but it does not implement proper normalization for plenty of mentioned issues which is a shame, really.

As I see it, everyone can just start with JSON (as JSON is a subset of YAML) and pretty-print it and use the result whenever it's supposed to be used.

In other words use safe subset of YAML. May be it'll be formalized some day. Yamlite.




That safe subset exists and is implemented in a number of languages. It is called strict-yaml: https://hitchdev.com/strictyaml/


In which languages is it implemented? I have seen a supposedly equivalent Rust library, but could not find anything else. Is there any C library or something like that? Unfortunately, these are the easiest to use from a lot of languages because of how easy they are to wrap.

(I am genuinely interested in any useful library better than libyaml).


They don't use quotes, so not safe.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: