1

I'v set up and new project of playframework 2.8, and my dilemmas are:

1. which dependency should I use:

"org.reactivemongo" %% "reactivemongo" % "1.0"

OR

  "org.reactivemongo" %% "play2-reactivemongo" // dont even think that there is 1.0 for play 2.8, is it deprecated?

2. up until now I used play-json for serialize/deserialize my objects that I insets or fetch from mongo, for example:

object MongoSerializer {
  implicit val InstantFormat = CommonSerializers.InstantSerializers.BSONFormat
  implicit val MetadataFormat: OFormat[Metadata] = Json.format[Metadata]
  implicit val PairingFormat: OFormat[Pairing] = Json.format[Pairing]
  implicit val pairTypeFormat: Format[PairType] = EnumFormats.formats(PairType)
}

and in my dbconfig I used _.collection[JSONCollection], but I remember someone wrote that JSONCollection is about to be deprecated and there will be only support for BSONCollection so I wanted to work with BSONCollection.

so as you can see I'm a bit confused, if there is someone who can help me understand what setup should I use and which serialize/deserialize will go best with it I will appreciate it allot. thanks!

cchantep
  • 9,118
  • 3
  • 30
  • 41
JohnBigs
  • 2,691
  • 3
  • 31
  • 61
  • Please, first read the [documentation](http://reactivemongo.org/releases/1.0/documentation/json/overview.html) – cchantep Nov 12 '20 at 22:17
  • @cchantep you right, I did invest more time on the documentation and found it very helpful. I'm all set now with version ```"1.0.0-play28"```. thank you. – JohnBigs Nov 14 '20 at 22:10

1 Answers1

0

I will go for the first option because some of my result is an aggregation/customization of different collections. Thus, I will have to write custom BSON/JSON converters myself.

Joseph Hui
  • 573
  • 6
  • 11