title: Convert Groovy Map to String in Yaml format
body: <p>I am using snakeYaml to convert a <strong>String</strong> in YAML format <strong>to</strong> Groovy <strong>Map</strong>.</p>
  <pre><code>@Grab(group='org.yaml', module='snakeyaml', version='1.17')
  import org.yaml.snakeyaml.Yaml
  
  Yaml yaml = new Yaml()
  
  Map config = yaml.load(new File('config.yaml').text)
  
  </code></pre>
  <p>I want to reach now the opposite : Given a Groovy <strong>Map</strong>, i want to convert it to <strong>String</strong> in YAML format WITHOUT WRITING THE STRING in a FILE.</p>
  <p>I found <code>groovy.yaml.YamlBuilder</code>. However, the groovy compiler of the environment is old and this class is not found.</p>
  <p>Ideally, the same lib (snakeYaml) can handle the opposite case. But no way to get it work.</p>