I\'m converting a list of Foo objects to a JSON string. I need to parse the JSON string back into a list of Foos. However in the following example, parsing gives me a list of JS
As of Grails 2.5, this is possible:
Period test = new Period() test.periodText = 'test' String j = test as JSON def p = JSON.parse(j) test = p.asType(Period) println(test.periodText)
Output:
test
I am unsure of when it became an option.