comparison docs/YamlIO.rst @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children 3a76565eade5
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
729 The YAML syntax supports tags as a way to specify the type of a node before 729 The YAML syntax supports tags as a way to specify the type of a node before
730 it is parsed. This allows dynamic types of nodes. But the YAML I/O model uses 730 it is parsed. This allows dynamic types of nodes. But the YAML I/O model uses
731 static typing, so there are limits to how you can use tags with the YAML I/O 731 static typing, so there are limits to how you can use tags with the YAML I/O
732 model. Recently, we added support to YAML I/O for checking/setting the optional 732 model. Recently, we added support to YAML I/O for checking/setting the optional
733 tag on a map. Using this functionality it is even possbile to support different 733 tag on a map. Using this functionality it is even possbile to support different
734 mappings, as long as they are convertable. 734 mappings, as long as they are convertible.
735 735
736 To check a tag, inside your mapping() method you can use io.mapTag() to specify 736 To check a tag, inside your mapping() method you can use io.mapTag() to specify
737 what the tag should be. This will also add that tag when writing yaml. 737 what the tag should be. This will also add that tag when writing yaml.
738 738
739 Validation 739 Validation