robfletcher/grails-gson — pull request #34 by naresha (2013-05-12 16:27:39+00:00)
Title: Fixes for inherited domain class, proxy resolution issues

This contains fixes for the following

1. Serializing an instance of a class with inherited fields fails. This is because, in GrailsDomainSerializer, getDeclaredField() cannot get an inherited field.

2. Proxies are not resolved. In GrailsDomainSerializer, proxyHandler.isInitialized() is used to check if the value is a proxy. However this returns true, even if value is a proxy. Instead proxyHandler.isProxy() works correctly.
I am not quite sure how to write an unit/integration test with a hibernate proxy here.