YAML, which stands for 'YAML Ain't Markup Language,' is a data serialization language that is designed to be human-readable. Unlike XML or JSON, YAML uses indentation and whitespace for structure, making it more intuitive for humans to create and read. YAML is often used for configuration files, data storage, and data exchange between programming languages with different data structures.
YAML's structure is determined by indentation, using spaces instead of tabs. Here is an example of a basic YAML structure:
name: John Doe age: 29 address: street: 123 Main St city: Anytown state: CA hobbies: - reading - hiking - cooking In this example, 'name', 'age', and 'address' are keys, with 'John Doe', '29', and a nested map as their respective values. 'hobbies' is a list containing three items.
YAML is commonly used for: