File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -300,4 +300,22 @@ Comments can be added in YAML by prefixing them with a hash mark (``#``):
300300 Comments are simply ignored by the YAML parser and do not need to be
301301 indented according to the current level of nesting in a collection.
302302
303+ Explicit Typing
304+ ---------------
305+
306+ The YAML specification defines some tags to set the type of any data explicitly:
307+
308+ .. code-block :: yaml
309+
310+ data :
311+ # this value is parsed as a float number (it will be 3.0 instead of 3)
312+ price : !!float 3
313+
314+ # this value is parsed as binary data encoded in base64
315+ picture : !!binary |
316+ R0lGODlhDAAMAIQAAP//9/X
317+ 17unp5WZmZgAAAOfn515eXv
318+ Pz7Y6OjuDg4J+fn5OTk6enp
319+ 56enmleECcgggoBADs=
320+
303321 .. _YAML : http://yaml.org/
You can’t perform that action at this time.
0 commit comments