strictyaml icon indicating copy to clipboard operation
strictyaml copied to clipboard

I can't find a simple description of the syntax

Open julie777 opened this issue 2 years ago • 2 comments

Feel free to raise an issue for any of the following:

  • Feature request

I would like to see an example that shows all the features/syntax of a strictyaml document with comments. There are some things that I haven't found an answer to and I don't want to read the yaml spec. Based on the percieved use cases of strictyaml I think it should have its own spec that is only a couple pages long and call itself yaml-like as opposed to saying it is a subset.

Example Doc

key:                      # defines a mapping to a compound value
    fred: is a good guy
    bob: is mean
mylist:                  # this is a named list, which is to say a mapping who's value is a list
- element 1
- element 2
description: this is a description
                    that is multiple lines
                    and when parsed will have trailing white space removed       # comments can appear anywhere and continue to the end  of the line
                    and leading white space replaced with a single space

julie777 avatar Feb 25 '22 17:02 julie777

As far as I know, the spec is literally the yaml spec minus what is outlined here: https://hitchdev.com/strictyaml/features-removed/

jnichols0 avatar Mar 03 '22 23:03 jnichols0

As far as I know, the spec is literally the yaml spec minus what is outlined here: https://hitchdev.com/strictyaml/features-removed/

That may be true, but it is a hard starting point for someone who has never used yaml and wants to use strictyaml for config files. (I have started trying to write a simpler document to allow users to get started with strictyaml. We'll see how that turns out.)

julie777 avatar Mar 04 '22 01:03 julie777