标签:标识 indicator explicit ann 开头 空格 efi 指定 aaaaa
列表
# 普通
- Casablanca
- North by Northwest
- The Man Who Wasn‘t There
# 单行
[milk, pumpkin pie, eggs, juice]
men: [John Smith, Bill Jones]
women:
- Mary Smith
- Susan Williams
映射
# Indented Block
name: John Smith
age: 33
# Inline Block
{name: John Smith, age: 33}
- {name: John Smith, age: 33}
- name: Mary Smith
age: 27
多行字符串
data: |
There once was a short man from Ealing
Who got on a bus to Darjeeling
It said on the door
"Please don‘t spit on the floor"
So he carefully spat on the ceiling
data: >
Wrapped text
will be folded
into a single
paragraph
Blank lines denote
paragraph breaks
指定类型
a: 123 # an integer
b: "123" # a string, disambiguated by quotes
c: 123.0 # a float
d: !!float 123 # also a float via explicit data type prefixed by (!!)
e: !!str 123 # a string, disambiguated by explicit type
f: !!str Yes # a string via explicit type
g: Yes # a boolean True (yaml1.1), string "Yes" (yaml1.2)
h: Yes we have No bananas # a string, "Yes" and "No" disambiguated by context.
picture: !!binary |
R0lGODdhDQAIAIAAAAAAANn
Z2SwAAAAADQAIAAACF4SDGQ
ar3xxbJ9p0qa7R0YxwzaFME
1IAADs=
myObject: !myClass { name: Joe, age: 15 }
标签:标识 indicator explicit ann 开头 空格 efi 指定 aaaaa
原文地址:https://www.cnblogs.com/milton/p/9924179.html