ToValue

sealed trait ToValue

Conversion API from BSON to JSON values

Companion:
object
class Object
trait Matchable
class Any
FromValueAPI

Value members

Abstract methods

def toDocument(js: JsObject): BSONDocument

See toValue

See toValue

def toNumber(js: JsNumber): BSONValue

If the number:

If the number:

  • is not whole then it's converted to BSON double,
  • is a valid integer then it's converted to a BSON integer (int32),
  • otherwise it's converted to a BSON long integer (int64).
def toValue(js: JsValue): BSONValue

Implicits

Implicits

final implicit def toArray(arr: JsArray): BSONArray
final implicit def toBoolean(js: JsBoolean): BSONBoolean
final implicit def toJsValueWrapper[T <: BSONValue](value: T): JsValueWrapper
@SuppressWarnings(scala.Array.apply[java.lang.String]("NullParameter")(scala.reflect.ClassTag.apply[java.lang.String](classOf[java.lang.String])))
final implicit def toStr(js: JsString): BSONValue

Inherited implicits

final implicit def toNull(_null: JsNull.type): BSONNull
Inherited from:
ToValueCompat (hidden)