![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://fry.gs/pictrs/image/c6832070-8625-4688-b9e5-5d519541e092.png)
YAML to JSON is probably doable, JSON back to YAML not so much.
There are multiple ways to mark multiline strings in YAML. Then there are anchors, like bionicjoey mentioned. Also comments, YAML has them. You’d have to have some way to retain the extra information, if you want to make the full round trip.
Here’s an example:
def-db: &def-db
# here be dragons
login: admin
passwd: nimda
prod:
db: *def-db
desc: |
I'm a teapot
short and stout
dev:
db:
<<: *def-db
passwd: pass
desc: "I'm a teapot\nshort and stout\n"
converted to JSON looks like this
{
"def-db": {
"login": "admin",
"passwd": "nimda"
},
"prod": {
"db": {
"login": "admin",
"passwd": "nimda"
},
"desc": "I'm a teapot\nshort and stout\n"
},
"dev": {
"db": {
"login": "admin",
"passwd": "pass"
},
"desc": "I'm a teapot\nshort and stout\n"
}
}
Not OP, but I kinda agree with them.
Teams are abstract, it’s easier to project your own ideals on to them. Not completely unlike respecting the office, even if loathing the politician currently holding it. It becomes “our thing”.
Also teams have longevity, or at least potential for longevity. Where I live, the two major local ice-hockey teams are founded in 1928 and 1967. There are families with generations of fans. Athlete’s career could be over in a decade.