grails.converters.JSON except few properties

I am using grails-1.3.2 and hbase-0.2.4.

I have the following domain class:

class MyClass{
  String val1
  String val2
  String val3

   //----

 }

class MyClassController{
    def someAction = {
        def myClass = new MyClass()
        //----

        String valAsJson = (myClass as JSON)

        render valAsJson 
     }
}

My question is, is any short way render only part of properties(for example render all except val3 property) ?

10
задан tim_yates 16 May 2011 в 09:50
поделиться