Blog Archives

8 YAML Interview Questions & Answers

YAML interview questions focus on it use cases & syntaxes as YAML is widely used in configuring your application, Docker, Kubernetes, Ansible, etc. This extends YAML with Spring & Java interview Q&As. These YAML interview questions will also help you learn the YAML syntax & use cases. Q1. Why YAML,…

Loading a YAML file with Jackson into a Map & flatten it

YAML files are often used application configuration. We have already looked at YAML interview Questions & Answers. There are multiple ways to load a YAML file like via Spring, Java Objects, etc. In this post, how to load it into a HashMap & flatten it.

Step 1: YAML library dependency – Jackson

Add the below dependency to pom.xml file:

YAML with Java using the SnakeYaml library tutorial

Step 1: Add “snakeyaml” to maven pom.xml as a dependency

Step 2: Define a YAML file under src/main/resources. For example, “logging.yml


YAML with Spring & Java interview Q&As

Q1. What is YAML?
A1. YAML Ain’t Markup Language. It is a human friendly data serialization standard for all programming languages. A YAML file has an extension of “.yml“.

Q2. What are the 3 rules of YAML?

Rule 1: Indentation YAML uses a fixed indentation scheme to represent relationships between data layers (i.e. 2 spaces). Never use a tab.

300+ Java & Big Data FAQs - Quick Prep

Java & Big Data Tutorials