4 ms·
I've considered just converting to JSON , editing, then converting back to yaml. Yaml is a nightmare and I've no idea why it ever caught on.
by pipes 3y ago
I've considered just converting to JSON , editing, then converting back to yaml. Yaml is a nightmare and I've no idea why it ever caught on.
- matthews2 3y agoYou don’t need to convert back to yaml. Your json is valid yaml.
- koolba 3y ago> … I've no idea why it ever caught on. People like YAML because it doesn’t require double quotes in the simple case of adding some text to a key. And people don’t like adding trailing commas to array items. The problem is the insanity of parsing values like “true” or “off” or “123”.
- viraptor 3y agoAlso multiline string blocks, comments, type tags, real datetimes.
- twic 3y agoIME, YAML appeals to people who like Ruby. I find both of them a nightmare, but it's clear that there is a kind of mine quite different to mine that sees something in them that i don't.
- salamander014 3y agoI’ve done this to automate and… err… “template” multiline string values back into valid yaml for proper indenting. Works great, the issue is explaining to anybody why it was necessary, they understand it works but plead for a better way. It’s one of those clever solutions that seems overcomplicated until you try to replace it and realize it’s actually quite elegant.