aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2025-06-25 15:13:45 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2025-06-25 15:14:13 +0000
commit5f99da5545ebe3c081dc126e00ec7d801db9c772 (patch)
treee692d78fdb6bc34a660e9e586c121e03afb8b5ff /examples
parent5c7ba42d2e90bdd94bb55c80d0787e998fad44f9 (diff)
libyaml: vendor import 0.2.5vendor/libyaml/0.2.5vendor/libyaml
Diffstat (limited to 'examples')
-rw-r--r--examples/anchors.yaml10
-rw-r--r--examples/array.yaml2
-rw-r--r--examples/global-tag.yaml14
-rw-r--r--examples/json.yaml1
-rw-r--r--examples/mapping.yaml2
-rw-r--r--examples/numbers.yaml1
-rw-r--r--examples/strings.yaml7
-rw-r--r--examples/tags.yaml7
-rw-r--r--examples/yaml-version.yaml3
9 files changed, 47 insertions, 0 deletions
diff --git a/examples/anchors.yaml b/examples/anchors.yaml
new file mode 100644
index 000000000000..875585317000
--- /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 000000000000..18efd12efbde
--- /dev/null
+++ b/examples/array.yaml
@@ -0,0 +1,2 @@
+- member
+- member2
diff --git a/examples/global-tag.yaml b/examples/global-tag.yaml
new file mode 100644
index 000000000000..1180757d81cb
--- /dev/null
+++ b/examples/global-tag.yaml
@@ -0,0 +1,14 @@
+%TAG ! tag:clarkevans.com,2002:
+--- !shape
+ # Use the ! handle for presenting
+ # tag:clarkevans.com,2002:circle
+- !circle
+ center: &ORIGIN {x: 73, y: 129}
+ radius: 7
+- !line
+ start: *ORIGIN
+ finish: { x: 89, y: 102 }
+- !label
+ start: *ORIGIN
+ color: 0xFFEEBB
+ text: Pretty vector drawing.
diff --git a/examples/json.yaml b/examples/json.yaml
new file mode 100644
index 000000000000..7822ddc8342f
--- /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 000000000000..53d256787c9f
--- /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 000000000000..45d2bf01b2ff
--- /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 000000000000..31b641f4f3cd
--- /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 000000000000..3d5a010ac0a6
--- /dev/null
+++ b/examples/tags.yaml
@@ -0,0 +1,7 @@
+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
+python_tag: !!python/complex '1.0+2.0j'
diff --git a/examples/yaml-version.yaml b/examples/yaml-version.yaml
new file mode 100644
index 000000000000..122b5082b6a7
--- /dev/null
+++ b/examples/yaml-version.yaml
@@ -0,0 +1,3 @@
+%YAML 1.1
+---
+[1, 2, 3]