Javaeye http://angeloce.iteye.com/admin/blogs/385976
========================================================== ============
Yaml is an intuitive data serialization format that can be recognized by computers. It is easy for humans to read and
Yaml is an easy to read, suitable for Presentation program language data structure, can be used to exchange data between different programs, support generic tools, support serial processing, rich expression capabilities and scalability, Easy-to-use
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
Directory[TOC]One, Yaml introductionYAML full name yet another Markup Language (another markup language). Using YAML as a configuration file, the file looks intuitive, concise, and easy to understand. Yaml files can parse the data structures of
Recently I am writing a PHP extension, which involves a YAML file parsing function... there are currently two solutions: Use a third-party YAML Library (pyyaml. orgwikiLibYAML), the disadvantage is that the third library needs to be installed during
This is a creation in
Article, where the information may have evolved or changed.
in order to publish our well-written server to the server, we have to build our code to package, so if you want to modify some code later, you need to re-compile the
Many applications are beginning to use YAML as a program configuration file, about Yaml detailed introduction can refer to Yaml 1.2 (3rd Edition), this article uses Snakeyaml to parse Yaml. maven Dependencies
org.yaml
snakeyaml
1.17
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 use of YAML modules in 1.python
(1) Install the YAML module into the machine environment
(2) Write Yaml configuration file Test.yaml
Name:tom Smith
age:37
spouse:
name:jane Smith
age:25
Children:
-Name:jimmy Smith age
:
System: ubuntu1404,python:2.7
Parse Yaml file to install Pyyaml First, you can directly use sudo pip install pyyaml install YAML module;
T.yaml file contents: 2 spaces or 4 spaces in a spacer
T.yaml "10L, 143C allhost:ip00:192.168
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.