Using server.toJSON for output