[go: up one dir, main page]

Skip to content

malaythakur/YAML

Repository files navigation

What is YAML?

  1. YAML, short for "YAML Ain't Markup Language" emphasizes that YAML is for data, not documents.
  2. It is a human-readable data serialization language.
  3. It was designed to be easy to read and write, making it a popular choice for configuration files and data exchange between applications.

YAML Syntax

  1. In YAML, data is represented using a combination of key-value pairs, lists, and nested structures.
  2. It uses whitespace indentation to indicate the nesting of structures, making it easy to read and understand.
  3. Tab characters are not allowed, so whitespaces are used instead.
  4. There are no usual format symbols, such as braces, square brackets, closing tags, or quotation marks.
  5. YAML files use a .yml or .yaml extension.
  6. YAML is also a superset of JSON, so JSON files are valid in YAML.

What is YAML used for?

  1. One of the most common uses for YAML is to create configuration files.
  2. One of the main advantages of YAML is its flexibility. It can be used for a wide range of data types, from simple configurations to complex data structures
  3. It's also easy to integrate with many programming languages, as there are libraries available for parsing and generating YAML data in most languages.
  4. YAML is used for Kubernetes resources and deployments.
  5. A benefit of using YAML is that YAML files can be added to source control, such as Github, so that changes can be tracked and audited.

Technical Terminologies

  • Data serialization is the process of converting data into a format that can be easily transmitted or stored. Think of it like packing your clothes into a suitcase before traveling - you are arranging your clothes in a specific way so that they can fit into the suitcase and be transported easily.

  • Serialization refers to the process of converting data structures or objects into a format that can be transmitted or stored as a sequence of bytes. The reverse process of converting the serialized data back into its original form is called deserialization.

  • Serialization languages are like different types of suitcases with different shapes, sizes, and features. Each suitcase is designed to fit specific types of clothes or items, and you need to choose the right suitcase depending on what you want to pack and where you are going. Similarly, each serialization language is designed for specific types of data structures and use cases, and you need to choose the right language depending on your requirements.

  • When you arrive at your destination, you need to unpack your suitcase to access your clothes. Similarly, when you receive serialized data, you need to deserialize it - that is, convert it back into its original form - to access the data.

  • Data serialization languages are used in a wide range of applications, including
    • Data exchange between different programming languages
    • Data storage
    • Network communication
    •       Examples of data serialization languages include JSON, YAML, and XML

  • The choice of data serialization language depends on the specific use case and requirements of the application. Some factors to consider include the
    • Complexity of the data structures being serialized.
    • The performance requirements of the application.
    • The compatibility with different programming languages and platforms.

  • Configuration files are files used to store settings and options that determine how a software application or system operates.
  •      - They are used to customize the behavior of an application or system according to specific requirements or preferences.
  • Configuration files can contain a wide range of settings, such as:
    • Network configuration settings (e.g. IP addresses, subnet masks, DNS servers)
    • Application settings (e.g. database connection details, logging settings, security settings)
    • Operating system settings (e.g. startup programs, user preferences, display settings)
    • Environment settings (e.g. path variables, environment variables)

  • Configuration files are important because they allow users to customize and fine-tune an application or system according to their specific needs. They also enable system administrators to deploy and manage large numbers of systems with consistent settings, making it easier to maintain and troubleshoot them.

  • JSON: JavaScript Object Notation
  • XML: Extensible Markup Language

About

Let's create configuration files using YAML

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published