-
Complex Data Structures with Anchors and Aliases π
- Define and reuse data structures without duplicating content using anchors (
&
) and aliases (*
).default_address: &address street: 123 Main St city: Anytown john: <<: *address name: John Doe
- Define and reuse data structures without duplicating content using anchors (
-
Merging Key-Value Pairs π€
- Reuse common key-value pairs in multiple places with the merge key (
<<
).default: &default color: blue size: large custom: <<: *default size: small
- Reuse common key-value pairs in multiple places with the merge key (
-
Multiline Strings π
- Define multiline strings in different ways, perfect for documentation or embedding scripts.
single_line: "This is a single line string." folded_style: > This is a multiline string where newlines will be folded into spaces. literal_style: | This is a multiline string where newlines are preserved.
- Define multiline strings in different ways, perfect for documentation or embedding scripts.
Created
August 24, 2023 13:54
-
-
Save Justin2997/6026168524c4ad7832a35d9bbec620b1 to your computer and use it in GitHub Desktop.
π 3 Lesser-Known YAML Features You Might Not Be Using!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment