Package

reactivemongo.play.json

compat

Permalink

package compat

Linear Supertypes
LowPriorityPackageCompat, PackageImplicits, ValueConverters, TemporalObjectConverters, LowPriority1Converters, SharedValueConverters, SharedValueConvertersLowPriority1, FromToValue, ToValue, ToValueCompat, FromValue, FromValueAPI, FromValueCompat, PackageCompat, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. compat
  2. LowPriorityPackageCompat
  3. PackageImplicits
  4. ValueConverters
  5. TemporalObjectConverters
  6. LowPriority1Converters
  7. SharedValueConverters
  8. SharedValueConvertersLowPriority1
  9. FromToValue
  10. ToValue
  11. ToValueCompat
  12. FromValue
  13. FromValueAPI
  14. FromValueCompat
  15. PackageCompat
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait FromValue extends FromValueCompat with FromValueAPI

    Permalink

    Conversion API from BSON to JSON values

  2. abstract type JsonJavaScript <: JsValue

    Permalink
    Definition Classes
    FromValue
  3. abstract type JsonNumber <: JsValue

    Permalink

    JSON representation for numbers

    JSON representation for numbers

    Definition Classes
    FromValue
  4. abstract type JsonObjectID <: JsValue

    Permalink
    Definition Classes
    FromValue
  5. abstract type JsonSymbol <: JsValue

    Permalink
    Definition Classes
    FromValue
  6. type JsonTime = JsObject

    Permalink
    Definition Classes
    TemporalObjectConverters
  7. sealed trait ToValue extends ToValueCompat

    Permalink

    Conversion API from BSON to JSON values

  8. trait ValueConverters extends FromToValue with SharedValueConverters with LowPriority1Converters with TemporalObjectConverters

    Permalink

    Implicit conversions for value types between play.api.libs.json and reactivemongo.api.bson.

    Implicit conversions for value types between play.api.libs.json and reactivemongo.api.bson.

    import play.api.libs.json.JsValue
    import reactivemongo.api.bson.BSONValue
    import reactivemongo.play.json.compat.ValueConverters._
    
    def foo(v: BSONValue): JsValue =
      implicitly[JsValue](v) // ValueConverters.fromValue
    
    def bar(v: JsValue): BSONValue =
      implicitly[BSONValue](v) // ValueConverters.toValue

    Note: Logger reactivemongo.api.play.json.ValueConverters can be used to debug.

Abstract Value Members

  1. abstract def fromDouble(bson: BSONDouble): JsonNumber

    Permalink
    Definition Classes
    FromValue
  2. abstract def fromInteger(bson: BSONInteger): JsonNumber

    Permalink
    Definition Classes
    FromValue
  3. abstract def fromJavaScript(bson: BSONJavaScript): JsonJavaScript

    Permalink
    Definition Classes
    FromValue
  4. abstract def fromLong(bson: BSONLong): JsonNumber

    Permalink
    Definition Classes
    FromValue
  5. abstract def fromObjectID(bson: BSONObjectID): JsonObjectID

    Permalink
    Definition Classes
    FromValue
  6. abstract def fromSymbol(bson: BSONSymbol): JsonSymbol

    Permalink
    Definition Classes
    FromValue
  7. abstract def toArray(arr: JsArray): BSONArray

    Permalink
    Attributes
    protected
    Definition Classes
    SharedValueConverters
  8. abstract def toStr(js: JsString): BSONValue

    Permalink
    Attributes
    protected
    Definition Classes
    SharedValueConverters

Concrete Value Members

  1. object ExtendedJsonConverters extends ExtendedJsonConverters

    Permalink

  2. object FromValue

    Permalink
  3. val JsFalse: play.api.libs.json.JsFalse.type

    Permalink

    Compatibility alias for play.api.libs.json.JsFalse (DO NOT USE)

    Compatibility alias for play.api.libs.json.JsFalse (DO NOT USE)

    Definition Classes
    PackageCompat
  4. val JsTrue: play.api.libs.json.JsTrue.type

    Permalink

    Compatibility alias for play.api.libs.json.JsTrue (DO NOT USE)

    Compatibility alias for play.api.libs.json.JsTrue (DO NOT USE)

    Definition Classes
    PackageCompat
  5. object LaxValueConverters extends LaxValueConverters

    Permalink

    Implicit conversions for value types between play.api.libs.json and reactivemongo.api.bson, using lax conversions.

  6. object ToValue

    Permalink
  7. object ValueConverters extends ValueConverters

    Permalink

    See compat$ and ValueConverters.

    See compat$ and ValueConverters.

    Note that as there is not a JSON equivalent for each BSON value (BSONDateTime, or even distinction between BSON long/int).

    So for example, using the default JSON handlers, a same Long property can be written in some documents as BSON long (NumberLong), and in some other as BSON integer (see ValueConverters.toNumber), which is ok to read all these documents, but can impact the MongoDB queries (same for date/time values that will be serialized as BSON string, rather than BSON date/time or timestamp).

  8. object extended extends ExtendedJsonConverters

    Permalink

  9. implicit final def fromArray(arr: BSONArray): JsArray

    Permalink
    Definition Classes
    FromValue
  10. implicit final def fromBinary(bin: BSONBinary): JsObject

    Permalink

    See syntax:

    See syntax:

    { "$binary": { "base64": "<payload>", "subType": "<t>" } }

    Definition Classes
    SharedValueConverters
  11. implicit final def fromBoolean(bson: BSONBoolean): JsBoolean

    Permalink
    Definition Classes
    SharedValueConverters
  12. implicit def fromDateTime(bson: BSONDateTime): JsObject

    Permalink

    See syntax:

    See syntax:

    { "$date": { "$numberLong": "<millis>" } }

    Definition Classes
    TemporalObjectConverters
  13. implicit final def fromDecimal(bson: BSONDecimal): JsObject

    Permalink
    Definition Classes
    SharedValueConverters
  14. implicit def fromDocument(bson: BSONDocument)(implicit conv: FromValue): JsObject

    Permalink
    Definition Classes
    SharedValueConverters
  15. implicit final def fromJavaScriptWS(bson: BSONJavaScriptWS): JsObject

    Permalink

    See syntax:

    See syntax:

    { "$code": "<javascript>", "$scope": { } }

    Definition Classes
    SharedValueConverters
  16. implicit final val fromMaxKey: (BSONMaxKey) ⇒ JsObject

    Permalink

    See syntax:

    See syntax:

    { "$maxKey": 1 }

    Definition Classes
    FromValueCompat
  17. implicit final val fromMinKey: (BSONMinKey) ⇒ JsObject

    Permalink

    See syntax:

    See syntax:

    { "$minKey": 1 }

    Definition Classes
    FromValueCompat
  18. implicit val fromNull: (BSONNull) ⇒ JsNull.type

    Permalink
    Definition Classes
    FromValueCompat
  19. implicit final def fromObject(js: JsObject): BSONValue

    Permalink
    Definition Classes
    SharedValueConverters
  20. implicit final def fromRegex(rx: BSONRegex): JsObject

    Permalink

    See syntax:

    See syntax:

    { "$regularExpression": { "pattern": "<regexPattern>", "options": "<options>" } }

    Definition Classes
    SharedValueConverters
  21. implicit final def fromStr(bson: BSONString): JsString

    Permalink
    Definition Classes
    FromValue
  22. implicit def fromTimestamp(ts: BSONTimestamp): JsObject

    Permalink

    See syntax:

    See syntax:

    { "$timestamp": {"t": <t>, "i": } }`

    Definition Classes
    TemporalObjectConverters
  23. implicit final val fromUndefined: (BSONUndefined) ⇒ JsObject

    Permalink

    See syntax:

    See syntax:

    { "$undefined": true }

    Definition Classes
    FromValueCompat
  24. implicit final def fromValue(bson: BSONValue): JsValue

    Permalink
    Definition Classes
    LowPriority1Converters
    Annotations
    @inline()
  25. final def jsonJavaScript(bson: BSONJavaScript): JsObject

    Permalink
    Attributes
    protected
    Definition Classes
    SharedValueConverters
  26. final def jsonValue(bson: BSONValue)(implicit conv: FromValue): JsValue

    Permalink
    Attributes
    protected
    Definition Classes
    FromValue
  27. object lax extends LaxValueConverters with LaxHandlerWorkarounds

    Permalink

    import play.api.libs.json._
    import reactivemongo.api.bson._
    import reactivemongo.play.json.compat.lax._
    
    Json.obj("_id" -> BSONObjectID.generate()) // objectIdWrites
    // { "_id": "as_string_instead_of_ObjectId" }
  28. implicit final def toBoolean(js: JsBoolean): BSONBoolean

    Permalink
    Definition Classes
    ToValue
  29. implicit final def toDocument(js: JsObject): BSONDocument

    Permalink
    Definition Classes
    SharedValueConvertersLowPriority1
  30. implicit final def toJsValueWrapper[T <: BSONValue](value: T): JsValueWrapper

    Permalink
    Definition Classes
    ToValue
  31. implicit final val toNull: (JsNull.type) ⇒ BSONNull

    Permalink
    Definition Classes
    ToValueCompat
  32. implicit final def toNumber(js: JsNumber): BSONValue

    Permalink
    Definition Classes
    SharedValueConverters
  33. def toString(): String

    Permalink
    Definition Classes
    compat → AnyRef → Any
  34. implicit final def toValue(js: JsValue): BSONValue

    Permalink
    Definition Classes
    SharedValueConvertersLowPriority1

Deprecated Value Members

  1. implicit final val jsObjectWrites: OWrites[JsObject]

    Permalink
    Definition Classes
    LowPriorityPackageCompat
    Annotations
    @deprecated
    Deprecated

    (Since version 0.20.6) Will be removed when provided by Play-JSON itself

Inherited from LowPriorityPackageCompat

Inherited from PackageImplicits

Inherited from ValueConverters

Inherited from TemporalObjectConverters

Inherited from LowPriority1Converters

Inherited from SharedValueConverters

Inherited from SharedValueConvertersLowPriority1

Inherited from FromToValue

Inherited from ToValue

Inherited from ToValueCompat

Inherited from FromValue

Inherited from FromValueAPI

Inherited from FromValueCompat

Inherited from PackageCompat

Inherited from AnyRef

Inherited from Any

Ungrouped