title: Is there a simple way to fetch a JSON dataset from a remote server in Grails?
body: <p>Is there a simple way to fetch a JSON dataset from a remote server in Grails?</p>
  
  <p>e.g. data at <code>http://example.com/data.json</code></p>
  
  <p>Data:</p>
  
  <pre><code>{
      "firstName": "John",
      "lastName": "Smith"
  }
  </code></pre>
  
  <p>example Groovy code (theoretical):</p>
  
  <pre><code>def data = getJson('http://example.com/data.json')
  println data.firstName // this will print "John"
  </code></pre>