Recently processed some configuration files, encountered in the YAML format of the file, because no previous contact with this format file, for XML is more familiar. So what is YAML? What are the advantages and disadvantages of it compared to XML?
Basic rules
YAML has the following basic rules:
1, Case sensitive
2. Use indentation to represent hierarchical relationships
3, prohibit the use of tab indentation, you can only use the space key
4. There is no limit to the indentation length, as
Serialization in. NET is usually in binary or xml format. After ajax emerged, the JSON format is also used, which is rare compared with YAML.
BinaryCannot be directly read. It must be decoded at the binary level;The format is defined by the vendor.
Yaml is an intuitive data serialization format that can be read by a computer, easily readable by humans, and easy to interact with scripting languages. Yaml is similar to XML, but syntax is much simpler than XML and is very simple and efficient for
Good articles must be transferred: http://www.cnblogs.com/chwkai/archive/2005/10/07/beginning_yaml.html
Yaml is also a thing. In the case of XML flooding, the appearance of Yaml is really a bright, in the initial study of Yaml after a rough summary
Since we have a Star package, we need to compile panda and other tools first after installing Rakudo on MoarVM. In this step, you need to pay attention to your @ * inc path and the actual $ PERL6LIB PATH. The $ PATH in panda after compilation is
This article is reproduced in the article, the original address: Http://www.ruanyifeng.com/blog/2016/07/yaml.html?f=tt
Programming is unavoidable to write configuration files, how to write configuration is also a learning.
YAML is a language
PHP reads the php code of the configuration file class (php, ini, yaml, xml:
_ Settings; foreach ($ var as $ key) {if (! Isset ($ result [$ key]) {return false;} $ result = $ result [$ key];} return $ result;} function load () {trigger_error
transferred from: Http://www.ruanyifeng.com/blog/2016/07/yaml.html?f=tt
YAML Language Tutorials
Author: Ruan Yi Feng
Date: July 4, 2016
Programming is unavoidable to write configuration files, how to write configuration is also a learning.
YAML is
Why do you use YAML?
Because Yaml is simple and friendly to human beings;
yaml:http://www.yaml.org/
Where is it going to be used?
The most basic, in the thinkphp configuration file can choose the Yaml format, you are willing to write Yaml simple
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.