How to escape indicator characters (i.e. : or - ) in YAML
问题 In a config file, I have a key to which I wish to assign a URL. The problem is that YAML interprets : and - characters as either creating mappings or lists, so it has a problem with the line url: http://www.example-site.com/ (both because of the colon following http and the hyphen in the middle) Is there an explicit way to escape ':' and '-' ? Or would it work to just put the whole thing in single quotes and call it a day? 回答1: Quotes: "url: http://www.example-site.com/" To clarify, I meant