How to parse part of a YAML file in SnakeYaml
<p>I am new to YAML and have parse a YAML config file that looks like:</p>

<pre><code>applications:
  authentication:
    service-version: 2.0
    service-url: https://myapp.corp/auth
    app-env: DEV
    timeout-in-ms: 5000
    enable-log: true

  service1:
    enable-log: true
    auth-required: true
    app-env: DEV
    timeout-in-ms: 5000
    service-url: https://myapp.corp/service1
    service-name: SomeService1
    service-version: 1.1
    service-namespace: http://myapp.corp/ns/service1

  service2:
    enable-log: true
    auth-required: true
    app-env: DEV
    timeout-in-ms: 5000
    service-url: https://myapp.corp/service2
    service-name: SomeService2
    service-version: 2.0
    service-namespace: http://myapp.corp/ns/service2
</code></pre>

<p>I have to parse to following <code>Map</code> structure</p>

<pre><code>+==================================+
| Key              |               |
+==================================+
| authentication   | AuthConfig    |
+----------------------------------+
| service1         | ServiceConfig |
+----------------------------------+
| service2         | ServiceConfig |
+----------------------------------+
</code></pre>

<p><code>AuthConfig</code> and <code>ServiceConfig</code> are the custom objects in our system.</p>

<p>Can someone provide some hints how to do it?</p>