I'm attempting to convert my Map<String, TableEntry> to JSON in my controller as follows
def index() {
// get tables
JSON.use('deep')
render(tables) as JSON
}
My TableEntry is a non-domain class as I do not wish to persist it
class TableEntry {
String teamName
Integer gamesPlayed = 0
Integer gamesWon = 0
Integer gamesDrawn = 0
Integer gamesLost = 0
Integer points = 0
// other methods
However, when my JSON is rendered in the client, I get the following:
'Team A':TableEntry@3b52fb28, 'Team Z':TableEntry@44e71d85
How do I get this to convert fully?