reactivemongo.play.json.compat
See Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using MongoDB Extended JSON syntax (v2).
See Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using MongoDB Extended JSON syntax (v2).
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.
See specifications.#conversion-table syntax]]
See Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using MongoDB Extended JSON syntax (v2).
See Implicit conversions for value types between
play.api.libs.json
and reactivemongo.api.bson
,
using MongoDB Extended JSON syntax (v2).
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.
See specifications.#conversion-table syntax]]
See syntax:
See syntax:
{ "$binary": { "base64": "" , "subType": "" } }
See syntax:
See syntax:
{ "$date": { "$numberLong": "" } }
See syntax:
See syntax:
{ "$numberDecimal": "" }
Converts to a JSON object
See syntax:
See syntax:
// For finite numbers: { "$numberDouble": "" } // For other numbers: { "$numberDouble": <"Infinity"|"-Infinity"|"NaN"> }
See syntax:
See syntax:
{ "$numberInt": "" }
{ "$code": "" }
{ "$code": "" , "$scope": { } }
See syntax:
See syntax:
{ "$numberLong": "" }
{ "$maxKey": 1 }
{ "$minKey": 1 }
First checks whether an explicit type (e.g.
First checks whether an explicit type (e.g. $binary
) is specified,
otherwise converts to a BSON document.
See syntax:
See syntax:
{ "$oid": "" }
See syntax:
See syntax:
{ "$regularExpression": { "pattern": "" , "options": "" } }
{ "$symbol": "" }
See syntax:
See syntax:
{ "$timestamp": {"t": <t>, "i": <i>} }
{ "$undefined": true }
See toValue
See toValue
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).