In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the common tools of YAML". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what are the common tools of YAML.
Grammar fundamentals comment line
Use the pound sign (#) to comment lines; single-line comments are supported, not multiple-line comments.
Document opener-Array-elementl- element2- element3 dictionary, complex dictionary # simple dictionary key: value# complex dictionary martin: name: Martin Developer job: Developer skill: Elite array and dictionary nesting-martin: name: Martin D'vloper job: Developer skills:-python-perl-pascal- tabitha: name: Tabitha Bitumen job: Developer skills:-lisp-fortran-erlang considerations
1) if you include a colon (:) in the value, you need to use quotation marks: foo: "bar: example"
2) if the value begins with curly braces ({), use quotation marks: foo: "{barexample}"
Common tools yamllint-A linter for YAML files
This tool is used to check whether the format of the YAML file is correct and to verify the YAML.
The tool can be installed by executing the following command:
# CentOS:yum install yamllint.noarch# Debianapt-get install yamllint
A simple example of use:
Yamllint / path/to/foo.yml
For other information, you can view the GitHub project home page and the command manual.
Yq (GitHub/kislyuk/yq), Python (recommended)
Project address: kislyuk/yq: Command-line YAML and XML processor-jq wrapper for YAML/XML documents
Official document: https://kislyuk.github.io/yq/
YAML-> JSON, a tool for converting YAML to JSON. The tool is packaged with jq, so you need to install the jq command first.
Install the yq command:
1) install the jq command: jq
2) install the yq command:
Pip3 install yqyq (GitHub/mikefarah/yq) = > Go
Project address: mikefarah/yq: yq is a portable command-line YAML processor
YAML-> JSON, a tool for converting YAML to JSON, developed by the Go language.
We did not use the command, only for the record here.
Thank you for your reading, these are the contents of "what are the common tools of YAML". After the study of this article, I believe you have a deeper understanding of what the common tools of YAML have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.