Hacker News new | ask | show | jobs
by marc_omorain 1257 days ago
At CircleCI, we have had to handle many strange YAML documents. Two that come to mind:

A recursive document:

    key: &anchor
     - *anchor
The `~` character represents null:

    ~:
     - ~
This parses as a map of {null: [null]}
1 comments

What were the authors trying to accomplish with these strange documents?
The recursive anchors seemed to be user-error. Either copy+paste bugs, or an anchors places in the wrong position.

The null character would appear when people try to write a string path, and use the the `~` character without quotes.

Break their parser, probably