SpringBoot-YAML format

Introduction to YAML

YAML tries to use a more agile way than XML to accomplish the tasks that XML accomplishes.

YAML is not XML.
Why not XML? because:

  • YAML is readable.
  • YAML and scripting languages ​​have good interactivity.
  • YAML uses the data types of the implementation language.
  • YAML has a consistent information model.
  • YAML is easy to implement.

The above 5 points are where XML is insufficient. At the same time, YAML also has the following advantages of XML:

  • YAML can be processed based on flow;
  • YAML has strong expressive ability and good scalability.

In short, YAML tries to use a more agile way than XML to accomplish the tasks that XML accomplishes.
Indirect source of YAML: https://www.ibm.com/developerworks/cn/xml/x-cn-yamlintro/index.html

I personally think that the biggest difference between YAML and others is that it is cumbersome or not.
YAML>properties>XML
is also very simple to actually apply...

YAML supports the following data types:
primitive data and package classes (such as int, java.lang.Integer)
JavaBean compatible objects (Structure support)
Collection (sequence support)
List
Set
Map (map support)
Arrays (sequence support)
BigInteger and BigDecimal
Date

To give a few examples,
raw data

age: 21
name: 于一九

Class object

student:
 name: 于一九
 age: 21

Array

array: {
    
    1,2,3,4}

This
is the basic one that is commonly used, and it's quite convenient

Guess you like

Origin blog.csdn.net/qq_36008278/article/details/114377451