mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-23 22:27:35 +03:00
137 lines
3.5 KiB
Markdown
137 lines
3.5 KiB
Markdown
|
---
|
|||
|
language: yaml
|
|||
|
contributors:
|
|||
|
- ["Adam Brenecki", "https://github.com/adambrenecki"]
|
|||
|
translators:
|
|||
|
- ["Zach Zhang", "https://github.com/checkcheckzz"]
|
|||
|
filename: learnyaml-cn.yaml
|
|||
|
lang: zh-cn
|
|||
|
---
|
|||
|
|
|||
|
YAML<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӿ<EFBFBD>д<EFBFBD>ɶ<EFBFBD><EFBFBD>ġ<EFBFBD>
|
|||
|
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>JSON<EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Python<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
YAML<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
```yaml
|
|||
|
# YAML<4D>е<EFBFBD>ע<EFBFBD>⿴<EFBFBD><E2BFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
################
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #
|
|||
|
################
|
|||
|
|
|||
|
# <20><><EFBFBD>ǵĸ<C7B5><C4B8><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
# <20><><EFBFBD>ȼ<EFBFBD><C8BC><EFBFBD><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ֵ䣬<D6B5><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
key: value
|
|||
|
another_key: Another value goes here.
|
|||
|
a_number_value: 100
|
|||
|
scientific_notation: 1e+12
|
|||
|
boolean: true
|
|||
|
null_value: null
|
|||
|
key with spaces: value
|
|||
|
# ע<><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD>ǣ<EFBFBD><C7A3><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>á<EFBFBD>
|
|||
|
"Keys can be quoted too.": "Useful if you want to put a ':' in your key."
|
|||
|
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>'<27><><EFBFBD>ֿ<EFBFBD>'(ʹ<><CAB9> |)<29><>
|
|||
|
# <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>'<27>۵<EFBFBD><DBB5><EFBFBD>'(ʹ<><CAB9> '>')<29><>
|
|||
|
literal_block: |
|
|||
|
This entire block of text will be the value of the 'literal_block' key,
|
|||
|
with line breaks being preserved.
|
|||
|
|
|||
|
The literal continues until de-dented, and the leading indentation is
|
|||
|
stripped.
|
|||
|
|
|||
|
Any lines that are 'more-indented' keep the rest of their indentation -
|
|||
|
these lines will be indented by 4 spaces.
|
|||
|
folded_style: >
|
|||
|
This entire block of text will be the value of 'folded_style', but this
|
|||
|
time, all newlines will be replaced with a single space.
|
|||
|
|
|||
|
Blank lines, like above, are converted to a newline character.
|
|||
|
|
|||
|
'More-indented' lines keep their newlines, too -
|
|||
|
this text will appear over two lines.
|
|||
|
|
|||
|
####################
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> #
|
|||
|
####################
|
|||
|
|
|||
|
# Ƕ<><C7B6><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵġ<C9B5>
|
|||
|
a_nested_map:
|
|||
|
key: value
|
|||
|
another_key: Another Value
|
|||
|
another_nested_map:
|
|||
|
hello: hello
|
|||
|
|
|||
|
# ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>
|
|||
|
0.25: a float key
|
|||
|
|
|||
|
# <20><>ֵҲ<D6B5><D2B2><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?<3F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>Ŀ<EFBFBD>ʼ<EFBFBD><CABC>
|
|||
|
? |
|
|||
|
This is a key
|
|||
|
that has multiple lines
|
|||
|
: and this is its value
|
|||
|
|
|||
|
# YAMLҲ<4C><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD>Ǻܶ<C7BA><DCB6><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD>ᱧԹ<E1B1A7><D4B9>
|
|||
|
|
|||
|
# <20><><EFBFBD><EFBFBD> (<28>ȼ<EFBFBD><C8BC>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
a_sequence:
|
|||
|
- Item 1
|
|||
|
- Item 2
|
|||
|
- 0.5 # sequences can contain disparate types
|
|||
|
- Item 4
|
|||
|
- key: value
|
|||
|
another_key: another_value
|
|||
|
-
|
|||
|
- This is a sequence
|
|||
|
- inside another sequence
|
|||
|
|
|||
|
# <20><>ΪYAML<4D><4C>JSON<4F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD>дJSON<4F><4E><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>
|
|||
|
json_map: {"key": "value"}
|
|||
|
json_seq: [3, 2, 1, "takeoff"]
|
|||
|
|
|||
|
#######################
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>YAML<4D>ص<EFBFBD> #
|
|||
|
#######################
|
|||
|
|
|||
|
# YAML<4D><4C><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>'ê'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2B5A5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD>ݡ<EFBFBD>
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>ֵ<EFBFBD><D6B5>
|
|||
|
anchored_content: &anchor_name This string will appear as the value of two keys.
|
|||
|
other_anchor: *anchor_name
|
|||
|
|
|||
|
# YAML<4D><4C><EFBFBD>б<EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>
|
|||
|
explicit_string: !!str 0.5
|
|||
|
# һЩ<D2BB><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD>ض<EFBFBD><D8B6><EFBFBD><EFBFBD>Եı<D4B5>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>Python<6F>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͡<EFBFBD>
|
|||
|
python_complex_number: !!python/complex 1+2j
|
|||
|
|
|||
|
####################
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>YAML<4D><4C><EFBFBD><EFBFBD> #
|
|||
|
####################
|
|||
|
|
|||
|
# <20>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֲ<EFBFBD><D6B2>ǽ<EFBFBD><C7BD>е<EFBFBD>YAML<4D><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
# ISO <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD><DABA><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD>ǿ<EFBFBD><C7BF>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD>
|
|||
|
datetime: 2001-12-15T02:59:43.1Z
|
|||
|
datetime_with_spaces: 2001-12-14 21:59:43.10 -5
|
|||
|
date: 2002-12-14
|
|||
|
|
|||
|
# <20><><EFBFBD><EFBFBD>!!binary<72><79>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>blob<6F><62>base64<36><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>
|
|||
|
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=
|
|||
|
|
|||
|
# YAML<4D><4C><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
set:
|
|||
|
? item1
|
|||
|
? item2
|
|||
|
? item3
|
|||
|
|
|||
|
# <20><>Pythonһ<6E><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD>null<6C><6C>ֵ<EFBFBD>ĵ<EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>ϵȼ<CFB5><C8BC>ڣ<EFBFBD>
|
|||
|
set2:
|
|||
|
item1: null
|
|||
|
item2: null
|
|||
|
item3: null
|
|||
|
```
|