How to convert casbah mongodb list to json in scala / play

前端 未结 3 354
余生分开走
余生分开走 2020-12-16 01:31

I\'m learning scala and mongodb at present and using the play! framework, so I\'m making all sorts of mistakes as I get my head around things. Currently I have a scala objec

3条回答
  •  遥遥无期
    2020-12-16 02:18

    You can try

    com.mongodb.util.JSON.serialize(Alerts.list())
    

    This should return a JSON array with your Alerts

提交回复
热议问题