Edmondo
Edmondo

Reputation: 20080

Single serialization layer to Json with Casbah/Salat

I am trying to create a serialization layer which allows me to:

Some classes are clearly not case classes (because they are inherited from a Java codebase) and I would have to write ad-hoc code for that. Is registering a BSON Hook for my non standard type the correct approach, and does it provide Json serialization?

Upvotes: 2

Views: 637

Answers (1)

prasinous
prasinous

Reputation: 798

Salat maintainer here.

You might prefer to create a Salat custom transformer instead of registering a BSON hook with Casbah.

See simple example and spec.

If you run into any issues, feel free to ping the mailing list with a small sample Github project that demonstrates what isn't working.

Upvotes: 3

Related Questions