title: Create JSON strings from Groovy variables in Jenkins Pipeline
body: <p>I have to create this JSON file in Groovy.
  I have try many things (<code>JsonOutput.toJson()</code> / <code>JsonSlurper.parseText()</code>) unsuccessfully.</p>
  
  <pre><code>{
     "attachments":[
        {
           "fallback":"New open task [Urgent]: &lt;http://url_to_task|Test out Slack message attachments&gt;",
           "pretext":"New open task [Urgent]: &lt;http://url_to_task|Test out Slack message attachments&gt;",
           "color":"#D00000",
           "fields":[
              {
                 "title":"Notes",
                 "value":"This is much easier than I thought it would be.",
                 "short":false
              }
           ]
        }
     ]
  }
  </code></pre>
  
  <p>This is for posting a Jenkins build message to Slack.</p>