reactivemongo.play.json.compat
Members list
Type members
Classlikes
Attributes
- Graph
- Supertypes
- Self type
Conversion API from BSON to JSON values
Conversion API from BSON to JSON values
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using lax conversions.
Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using lax conversions.
Attributes
- Graph
- Supertypes
- Self type
- LaxValueConverters.type
Conversion API from BSON to JSON values
Conversion API from BSON to JSON values
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- FromValueAPI
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).
Attributes
- Companion:
- trait
- Graph
- Supertypes
- Self type
- ValueConverters.type
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.
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object ValueConverters.type
Value members
Concrete methods
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns:
a string representation of the object.
- Definition Classes
- Any
Inherited fields
Compatibility alias for play.api.libs.json.JsFalse
(DO NOT USE)
Compatibility alias for play.api.libs.json.JsFalse
(DO NOT USE)
Attributes
- Inherited from:
- PackageCompat (hidden)
Compatibility alias for play.api.libs.json.JsTrue
(DO NOT USE)
Compatibility alias for play.api.libs.json.JsTrue
(DO NOT USE)
Attributes
- Inherited from:
- PackageCompat (hidden)
Implicits
Deprecated and Inherited implicits
Attributes
- Deprecated
- true
- Inherited from:
- LowPriorityPackageCompat (hidden)