0 votes
in JSON by
Do I need quotes for strings in YAML?

1 Answer

0 votes
by

After a brief review of the YAML cookbook cited in the question and some testing, here's my interpretation:

  • In general, you don't need quotes.
  • Use quotes to force a string, e.g. if your key or value is 10 but you want it to return a String and not a Fixnum, write '10' or "10".
  • Use quotes if your value includes special characters, (e.g. :{}[],&*#?|-<>=!

Related questions

0 votes
asked Jan 5, 2021 in JSON by GeorgeBell
0 votes
asked Jan 5, 2021 in JSON by GeorgeBell
...