BSON

reactivemongo.api.bson.BSON$
object BSON

Utility functions

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
BSON.type

Members list

Concise view

Value members

Concrete methods

def read[T](bson: BSONValue)(implicit reader: BSONReader[T]): Try[T]

Produces a T instance of the given BSON value, if there is a corresponding BSONReader in the implicit scope.

Produces a T instance of the given BSON value, if there is a corresponding BSONReader in the implicit scope.

Prefer readDocument over this one if you want to deserialize BSONDocuments.

Attributes

def readDocument[T](doc: BSONDocument)(implicit reader: BSONDocumentReader[T]): Try[T]

Produces a T instance of the given BSONDocument, if there is a corresponding BSONReader in the implicit scope.

Produces a T instance of the given BSONDocument, if there is a corresponding BSONReader in the implicit scope.

Attributes

def write[T](t: T)(implicit writer: BSONWriter[T]): Try[BSONValue]

Produces a BSONValue instance of the given T value, if there is a corresponding BSONWriter in the implicit scope.

Produces a BSONValue instance of the given T value, if there is a corresponding BSONWriter in the implicit scope.

Prefer writeDocument over this one if you want to serialize T instances.

Attributes

def writeDocument[T](t: T)(implicit writer: BSONDocumentWriter[T]): Try[BSONDocument]

Produces a BSONDocument of the given T instance, if there is an implicit BSONWriter` in the implicit scope.

Produces a BSONDocument of the given T instance, if there is an implicit BSONWriter` in the implicit scope.

Attributes