kmongo icon indicating copy to clipboard operation
kmongo copied to clipboard

Gson Mapping Engine

Open mbStavola opened this issue 6 years ago • 1 comments

I was wondering if there are any plans to add Gson as an object mapper?

The Jackson option is great, but it's kind of annoying to integrate KMongo with a codebase that already heavily relies on Gson (duplication of effort for serialization, two serde libs, et cetera).

mbStavola avatar Apr 24 '18 18:04 mbStavola

There is no plan today to add Gson support.

For Jackson, bson4jackson is used under the hood for direct bson <-> object mapping.

I don't know any Gson lib with the same feature (direct bson support is needed, not JSONObject <-> Gson, because then there is a performance penalty). If this lib exists, it would be easy to add Gson support to KMongo.

zigzago avatar Apr 30 '18 19:04 zigzago