title: How to simplify my yaml structure for better readability in java
body: <p>If I have the following yaml structure, how can I read it in java efficiently? Currently, I an reading as</p>
  <pre><code>xmas-fifth-day:
     calling-birds: 
       value: four
     partridges:
       count: 1
       value: &quot;a pear tree&quot;
     turtle-doves: 
       value: two
  
  </code></pre>
  <pre><code>
  Yaml yaml = new Yaml();
  InputStream inputStream = new FileInputStream(new File(&quot;src/main/resources/customer.yaml&quot;));
  Map&lt;String, Object&gt; data = yaml.load(inputStream);
  
  LinkedHashMap&lt;String, LinkedHashMap&lt;String, LinkedHashMap&lt;String, String&gt;&gt;&gt; lhm = (LinkedHashMap&lt;String, LinkedHashMap&lt;String, LinkedHashMap&lt;String, String&gt;&gt;&gt;) data.get(&quot;xmas-fifth-day&quot;);
  
  </code></pre>
  <p>Since I am using 3 levels of hashmap, just for the readability purpose, I was wondering if there's a simplified version of this yaml structure to read in less nesting LHM way in java?</p>
  <p>EDIT: I don't want to add a POJO here since the config is meant to be dynamic in my use case, where any one can add any config and the code should work without editing the java classes.</p>