Online YAML Parser
Output
{ "true": [ "push", "pull_request" ], "jobs": { "test": { "strategy": { "matrix": { "go-version": [ "1.14.x", "1.15.x" ], "os": [ "ubuntu-latest", "macos-latest", "windows-latest" ] } }, "steps": [ { "uses": "actions/setup-go@v2", "with": { "go-version": "${{ matrix.go-version }}" }, "name": "Install Go" }, { "uses": "actions/checkout@v2", "name": "Checkout code" }, { "run": "go test ./...", "name": "Test" } ], "runs-on": "${{ matrix.os }}" }, "test-cache": { "steps": [ { "uses": "actions/setup-go@v2", "with": { "go-version": "1.15.x" }, "name": "Install Go" }, { "uses": "actions/checkout@v2", "name": "Checkout code" }, { "uses": "actions/cache@v2", "with": { "path": "~/go/pkg/mod # Module download cache\n~/.cache/go-build # Build cache (Linux)\n~/Library/Caches/go-build # Build cache (Mac)\n'%LocalAppData%\\go-build' # Build cache (Windows)\n", "restore-keys": "${{ runner.os }}-go-\n", "key": "${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}" } }, { "run": "go test ./...", "name": "Test" } ], "runs-on": "ubuntu-latest" } }, "name": "Test" }
Examples from YAML 1.2 Spec
- - Mark McGwire - Sammy Sosa - Ken Grif...
- hr: 65 # Home runs avg: 0.278 # Bat...
- american: - Boston Red Sox - Detro...
- - name: Mark McGwire hr: 65 a...
- - [name , hr, avg ] - [Mark McG...
- Mark McGwire: {hr: 65, avg: 0.278} Samm...
- # Ranking of 1998 home runs --- - Mark...
- --- time: 20:03:20 player: Sammy Sosa ...
- --- hr: # 1998 hr ranking - Mark McG...
- --- hr: - Mark McGwire # Followin...
- ? - Detroit Tigers - Chicago cubs : ...
- --- # Products purchased - item : S...
- # ASCII Art --- | \//||\/|| // ||...
- --- > Mark McGwire's year was crip...
- > Sammy Sosa completed another fine ...
- name: Mark McGwire accomplishment: > ...
- unicode: "Sosa did fine.\u263A" control...
- plain: This unquoted scalar spans ...
- canonical: 12345 decimal: +12345 octal...
- canonical: 1.23015e+3 exponential: 12.3...
- null: booleans: [ true, false ] string...
- canonical: 2001-12-15T02:59:43.1Z iso86...
- --- not-date: !!str 2002-04-28 pictu...
- %TAG ! tag:clarkevans.com,2002: --- !sh...
- # Sets are represented as a # Mapping w...
- # Ordered maps are represented as # A s...
- --- !<tag:clarkevans.com,2002:invoice> ...
- --- Time: 2001-11-23 15:01:42 -5 User:...