From 1d24d4d2ab6656bba29e949cdf5ffe15b98429cb Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 23 Nov 2016 09:52:14 -0600 Subject: [PATCH] added an examples directory with a few yaml examples --- examples/anchors.yaml | 10 ++++++++++ examples/array.yaml | 2 ++ examples/json.yaml | 1 + examples/mapping.yaml | 2 ++ examples/numbers.yaml | 1 + examples/strings.yaml | 7 +++++++ examples/tags.yaml | 6 ++++++ 7 files changed, 29 insertions(+) create mode 100644 examples/anchors.yaml create mode 100644 examples/array.yaml create mode 100644 examples/json.yaml create mode 100644 examples/mapping.yaml create mode 100644 examples/numbers.yaml create mode 100644 examples/strings.yaml create mode 100644 examples/tags.yaml diff --git a/examples/anchors.yaml b/examples/anchors.yaml new file mode 100644 index 0000000..8755853 --- /dev/null +++ b/examples/anchors.yaml @@ -0,0 +1,10 @@ +base: &base + name: Everyone has same name + +foo: &foo + <<: *base + age: 10 + +bar: &bar + <<: *base + age: 20 diff --git a/examples/array.yaml b/examples/array.yaml new file mode 100644 index 0000000..18efd12 --- /dev/null +++ b/examples/array.yaml @@ -0,0 +1,2 @@ +- member +- member2 diff --git a/examples/json.yaml b/examples/json.yaml new file mode 100644 index 0000000..7822ddc --- /dev/null +++ b/examples/json.yaml @@ -0,0 +1 @@ +{"key": ["value", 3]} diff --git a/examples/mapping.yaml b/examples/mapping.yaml new file mode 100644 index 0000000..53d2567 --- /dev/null +++ b/examples/mapping.yaml @@ -0,0 +1,2 @@ +key: value +other-key: other-value diff --git a/examples/numbers.yaml b/examples/numbers.yaml new file mode 100644 index 0000000..45d2bf0 --- /dev/null +++ b/examples/numbers.yaml @@ -0,0 +1 @@ +[100, 12.5, -130, 1.3e+9] diff --git a/examples/strings.yaml b/examples/strings.yaml new file mode 100644 index 0000000..31b641f --- /dev/null +++ b/examples/strings.yaml @@ -0,0 +1,7 @@ +unqouted: string +literal-block: | + This entire block of text will be the value of the 'literal-block' key, + with line breaks being preserved. +folded: > + This entire block of text will be the value of 'folded', but this + time, all newlines will be replaced with a single space. diff --git a/examples/tags.yaml b/examples/tags.yaml new file mode 100644 index 0000000..3d31538 --- /dev/null +++ b/examples/tags.yaml @@ -0,0 +1,6 @@ +gif_file: !!binary | + R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5 + OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+ + +f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC + AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs= +explicit_string: !!str 0.5 -- 2.45.1