GRAILS-11646 add test for JSON encoding handling