title: Unable to use "as JSON" after upgrading to grails 2.1.1 from grails 1.3.4
body: <p>I'm in the process of upgrading a grails plugin from 1.3.4 to grails 2.1.1. After upgrading I now have an integration test that fails that was not failing before. It fails on using the "as JSON" (grails.converters.JSON).</p>
  
  <pre><code>    @Test
  public void testConvertCollectionOfEnvironmentSettingsToJSON() {
      EnvironmentSetting setting = configurationService.getEnvironmentSetting('ENFORCE_SCHEMA_INSTANCE_RULE')
  
      def jsonSetting = setting as JSON //exception thrown here
      def s = jsonSetting as String
  
      assertNotNull jsonSetting
  }
  </code></pre>
  
  <p>The exception and stacktrace:</p>
  
  <pre><code>org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'com.company.ipsvc.configuration.domain.EnvironmentSettingAllRevs@48c12420' with class 'com.company.ipsvc.configuration.domain.EnvironmentSettingAllRevs' to class 'grails.converters.JSON'
  at com.company.ipsvc.configuration.converter.json.basic.BasicEnvironmentSettingJSONIntegrationTests.testConvertCollectionOfEnvironmentSettingsToJSON(BasicEnvironmentSettingJSONIntegrationTests.groovy:28)
  </code></pre>
  
  <p>I am able to use encodeAsJSON() successfully. I also have the same issue with as XML.</p>