JSONCollection vs BSONCollection

253 views
Skip to first unread message

Sunil Pasumarthi

unread,
Jun 5, 2015, 6:45:51 AM6/5/15
to reacti...@googlegroups.com
which collection must be used since both can be used to get work done.

Sunil Pasumarthi

unread,
Jun 6, 2015, 3:09:42 AM6/6/15
to reacti...@googlegroups.com
I am asking in terms of time complexity. Which takes less time and which is lighter in weight?

cchantep

unread,
Jun 7, 2015, 7:04:50 AM6/7/15
to reacti...@googlegroups.com
I don't think the question should first be considered in the light of time or complexity. Either you work with JSON and so JSONCollection is easier, otherwise you can work with BSONCollection without dependency/library other than ReactiveMongo base driver.

valtteri...@hotmail.com

unread,
Jun 9, 2015, 4:55:15 AM6/9/15
to reacti...@googlegroups.com
On Sunday, June 7, 2015 at 2:04:50 PM UTC+3, cchantep wrote:
I don't think the question should first be considered in the light of time or complexity. Either you work with JSON and so JSONCollection is easier, otherwise you can work with BSONCollection without dependency/library other than ReactiveMongo base driver.

Also note that both collections can be used at the same time. The JSONCollection doesn't support all the operations that BSONCollection does and also isn't quite as strong with data typing. JSON just doesn't contain as much information as BSON. As an example, JSON supports a type Number while BSON distinguishes between different types of numbers.

I would say if you don't use JSON otherwise, then go for BSON. If you use JSON, either still use BSONCollection or use a combination to get the full range of capabilities, like findAndModify commands.

We use BSON just about exclusively for saving data but sometimes fetch it with JSON if we just want to pass the JSON as it is to our client.

cchantep

unread,
Jun 15, 2015, 7:10:14 AM6/15/15
to reacti...@googlegroups.com
With the future 0.11 driver, both collections have been refactored to comply with the new common serialization API, so that features will be present on both.

Sunil Pasumarthi

unread,
Jun 15, 2015, 7:18:32 AM6/15/15
to reacti...@googlegroups.com
does that future driver supports play 2.4?? or should play 2.4 app need another way to include play-reactivemongo plugin to get things done??

Cédric Chantepie

unread,
Jun 15, 2015, 5:09:48 PM6/15/15
to reacti...@googlegroups.com
It will support Play 2.4.
Message has been deleted

Sunil Pasumarthi

unread,
Jun 20, 2015, 7:48:24 AM6/20/15
to reacti...@googlegroups.com
so if i use BSONCollection for my json data for inserting, will it go and directly sit into mongodb so that i have already converted into BSON?? or will it go any other conversion to mongodb bson??

Sam Lee

unread,
Jun 20, 2015, 8:02:21 AM6/20/15
to reacti...@googlegroups.com
What is JSONCollection? There is no such thing in ReactiveMongo: http://reactivemongo.org/releases/0.10.5/api/index.html

On Sat, Jun 20, 2015 at 7:48 AM, Sunil Pasumarthi <itssu...@gmail.com> wrote:
so if i use BSONCollection for my json data for inserting, will it go and directly sit into mongodb so that i have already converted into BSON?? or will it go any other conversion to mongodb bson??

--
You received this message because you are subscribed to the Google Groups "ReactiveMongo - http://reactivemongo.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactivemong...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunil Pasumarthi

unread,
Jun 20, 2015, 9:29:43 AM6/20/15
to reacti...@googlegroups.com
JSONCollection does not comes with ReactiveMongo Driver, it comes with ReactiveMongo Plugin..
Reply all
Reply to author
Forward
Message has been deleted
0 new messages