title: What is the standard method for achieving Object-JSON mapping in Groovy?
body: <p>In Java, if I want to transform some JSON into a POJO (or vice veersa), I'll use Gson or even FlexJson to do the conversion for me inside some kind of mapper object:</p>
  
  <pre><code>public interface JsonMapper&lt;T&gt; {
      public T toPojo(String json);
      public String toJson(T pojo);
  }
  
  public class WidgetJsonMapper implements JsonMappper&lt;Widget&gt; {
      private Gson mapper;
  
      @Override
      public Widget toPojo(String json) {
          // Use mapper to deserialize JSON into POJO
      }
  
      @Override
      public String toJson(Widget pojo) {
          // Use mapper to serialize a Widget instance into a JSON string.
      }
  }
  </code></pre>
  
  <p>etc. I'm wondering how the game changes here when we're talking about Groovy.  I see Grooovy has a <code>JsonSlurper</code> built right into it and was wondering if that could be used in lieu of a JSON mapping framework (like Gson) somehow.</p>