BSONValue

object BSONValue

BSONValue factories and utilities

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

object Addition extends (BSONValue, BSONValue) => BSONArray

An addition operation for BSONValue, so that it forms an additive semigroup with the BSON value kind.

An addition operation for BSONValue, so that it forms an additive semigroup with the BSON value kind.

Inherited classlikes

final protected class UnsafeValueProducer(f: => Try[BSONValue])
Inherited from:
BSONValueLowPriority2

Value members

Concrete methods

def pretty(value: BSONValue): String

Returns a String representation for the value.

Returns a String representation for the value.

import reactivemongo.api.bson.{ BSONDocument, BSONValue }

def foo(v: BSONValue): String = BSONValue.pretty(v)

foo(BSONDocument("bar" -> 1))
// { "bar": 1 }

Givens

Inherited givens

given noneProducer: Conversion[None.type, Producer[BSONValue]]
Inherited from:
BSONValueLowPriority1

Implicits

Implicits

implicit def identityValueProducer[B <: BSONValue](value: B): Producer[BSONValue]

Inherited implicits

implicit def optionProducer[T](value: Option[T])(implicit writer: BSONWriter[T]): Producer[BSONValue]
Inherited from:
BSONValueLowPriority2
implicit def safeOptionProducer[T](value: Option[T])(implicit writer: SafeBSONWriter[T]): Producer[BSONValue]
Inherited from:
BSONValueLowPriority1
implicit def safeValueProducer[T](value: T)(implicit writer: SafeBSONWriter[T]): Producer[BSONValue]
Inherited from:
BSONValueLowPriority1
implicit def valueProducer[T](value: T)(implicit writer: BSONWriter[T]): Producer[BSONValue]
Inherited from:
BSONValueLowPriority3