getting cursor as json to client