Question : marshaller in grails
Answered by : silly-sandpiper-8ny2trv4zjg8
static { JSON.registerObjectMarshaller(this){ Map<String,DomainName> objDomain = new LinkedHashMap<>(it.properties) objDomain.id = it.id objDomain.objectOtherDomain = OtherDomainName.get(it.otherDomainId) return objDomain } }
Source : | Last Update : Thu, 18 Feb 21