Grails - collection propery don't get rendered to JSON/XML -
i have domain class has collection type property. i'd render json, or xml won't show. don't know why that's so.
here's example:
class bag { list things }
but renders (in json) as:
{"class":"com.mystuff.bag","id":null}
even if put objects in list. check problems?
update 1
i tried doing same thing on project , can see list getting marshalled json no additional configuration. other project test 1 using more vanilla settings. don't remember changing config on actual project though.
update 2
so testing code , found out json marshalling works fine collections, until place domain class inside @mock
, @mock(bag)
. i'm not sure why happening. assume whatever @mock
domain classes, grails run-app
well.
Comments
Post a Comment