Parse JSON Response in grails

F

ferasodh

Guest
I sent a response for one action as JSON. Now in a filter I want to parse this response and get some variables from it. Here is my action:

def testJson(){
withFormat{

json{
JSONObject result = new JSONObject()
result.put('success', true)
result.put('msg', "msg")
render {result as JSON}
}
}
}

How could I parse this response in the filter? I tried response.JSON (got an exception).

Thanks,
 
Top