refactor RModules.knownDataTypes method plus parse JSON in a grails way