marshaller in grails code example
Example: marshaller in grails
static {
JSON.registerObjectMarshaller(this){
Map<String,DomainName> objDomain = new LinkedHashMap<>(it.properties)
objDomain.id = it.id
objDomain.objectOtherDomain = OtherDomainName.get(it.otherDomainId)
return objDomain
}
}