Edmondo
Edmondo

Reputation: 20080

Single serialization for MongoDB and AJAX with Scala drivers

I have a multi modular Scala application abd I need to implement:

My problem is that I would like to avoid using MongoDB JSON Api for converting to JSON.

Is there a clever way to develop a single serialization layer and convert from JSON to BSON format for MongoDB ?

Upvotes: 0

Views: 150

Answers (1)

nairbv
nairbv

Reputation: 4323

I think you can use the jackson mapper to get json, and use Salat DAO (which iirc uses the same jackson mapper) to store your objects in Mongo. Salat only works with case classes, not sure if that's an issue.

Upvotes: 2

Related Questions