trait ValueConverters extends FromToValue with SharedValueConverters with LowPriority1Converters with TemporalObjectConverters
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.
- Alphabetic
- By Inheritance
- ValueConverters
- TemporalObjectConverters
- LowPriority1Converters
- SharedValueConverters
- SharedValueConvertersLowPriority1
- FromToValue
- ToValue
- FromValue
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
-
final
type
JsonJavaScript = JsObject
- Definition Classes
- ValueConverters → FromValue
-
final
type
JsonNumber = JsNumber
JSON representation for numbers
JSON representation for numbers
- Definition Classes
- ValueConverters → FromValue
-
final
type
JsonObjectID = JsObject
- Definition Classes
- ValueConverters → FromValue
-
final
type
JsonSymbol = JsObject
- Definition Classes
- ValueConverters → FromValue
-
type
JsonTime = JsObject
- Definition Classes
- TemporalObjectConverters
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ValueConverters to any2stringadd[ValueConverters] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (ValueConverters, B)
- Implicit
- This member is added by an implicit conversion from ValueConverters to ArrowAssoc[ValueConverters] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
ensuring(cond: (ValueConverters) ⇒ Boolean, msg: ⇒ Any): ValueConverters
- Implicit
- This member is added by an implicit conversion from ValueConverters to Ensuring[ValueConverters] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ValueConverters) ⇒ Boolean): ValueConverters
- Implicit
- This member is added by an implicit conversion from ValueConverters to Ensuring[ValueConverters] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ValueConverters
- Implicit
- This member is added by an implicit conversion from ValueConverters to Ensuring[ValueConverters] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ValueConverters
- Implicit
- This member is added by an implicit conversion from ValueConverters to Ensuring[ValueConverters] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ValueConverters to StringFormat[ValueConverters] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
implicit final
def
fromArray(arr: BSONArray): JsArray
- Definition Classes
- FromValue
-
implicit final
def
fromBinary(bin: BSONBinary): JsObject
See syntax:
See syntax:
{ "$binary": { "base64": "<payload>", "subType": "<t>" } }
- Definition Classes
- SharedValueConverters
-
implicit final
def
fromBoolean(bson: BSONBoolean): JsBoolean
- Definition Classes
- SharedValueConverters
-
implicit
def
fromDateTime(bson: BSONDateTime): JsObject
See syntax:
See syntax:
{ "$date": { "$numberLong": "<millis>" } }
- Definition Classes
- TemporalObjectConverters
-
implicit final
def
fromDecimal(bson: BSONDecimal): JsObject
- Definition Classes
- SharedValueConverters
-
implicit
def
fromDocument(bson: BSONDocument)(implicit conv: FromValue): JsObject
- Definition Classes
- SharedValueConverters
-
implicit final
def
fromDouble(bson: BSONDouble): JsNumber
- Definition Classes
- ValueConverters → FromValue
-
implicit final
def
fromInteger(bson: BSONInteger): JsNumber
- Definition Classes
- ValueConverters → FromValue
-
implicit
def
fromJavaScript(bson: BSONJavaScript): JsObject
See syntax:
See syntax:
{ "$code": "<javascript>" }
- Definition Classes
- ValueConverters → FromValue
- Annotations
- @inline()
-
implicit final
def
fromJavaScriptWS(bson: BSONJavaScriptWS): JsObject
See syntax:
See syntax:
{ "$code": "<javascript>", "$scope": { } }
- Definition Classes
- SharedValueConverters
-
implicit final
def
fromLong(bson: BSONLong): JsNumber
- Definition Classes
- ValueConverters → FromValue
-
implicit final
val
fromMaxKey: (BSONMaxKey) ⇒ JsObject
See syntax:
-
implicit final
val
fromMinKey: (BSONMinKey) ⇒ JsObject
See syntax:
-
implicit
val
fromNull: (BSONNull) ⇒ JsNull.type
- Definition Classes
- FromValue
-
implicit final
def
fromObject(js: JsObject): BSONValue
- Definition Classes
- SharedValueConverters
-
implicit final
def
fromObjectID(bson: BSONObjectID): JsObject
See syntax:
See syntax:
{ "$oid": "<ObjectId bytes>" }
- Definition Classes
- ValueConverters → FromValue
- Annotations
- @inline()
- See also
dsl.objectID
-
implicit final
def
fromRegex(rx: BSONRegex): JsObject
See syntax:
See syntax:
{ "$regularExpression": { "pattern": "<regexPattern>", "options": "<options>" } }
- Definition Classes
- SharedValueConverters
-
implicit final
def
fromStr(bson: BSONString): JsString
- Definition Classes
- FromValue
-
implicit final
def
fromSymbol(bson: BSONSymbol): JsObject
See syntax:
See syntax:
{ "$symbol": "<name>" }
- Definition Classes
- ValueConverters → FromValue
- Annotations
- @inline()
- See also
dsl.symbol
-
implicit
def
fromTimestamp(ts: BSONTimestamp): JsObject
See syntax:
See syntax:
{ "$timestamp": {"t": <t>, "i": } }`
- Definition Classes
- TemporalObjectConverters
-
implicit final
val
fromUndefined: (BSONUndefined) ⇒ JsObject
See syntax:
-
implicit final
def
fromValue(bson: BSONValue): JsValue
- Definition Classes
- LowPriority1Converters
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
jsonJavaScript(bson: BSONJavaScript): JsObject
- Attributes
- protected
- Definition Classes
- SharedValueConverters
-
final
def
jsonValue(bson: BSONValue)(implicit conv: FromValue): JsValue
- Attributes
- protected
- Definition Classes
- FromValue
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit final
def
toArray(arr: JsArray): BSONArray
- Definition Classes
- ToValue
-
implicit final
def
toBoolean(js: JsBoolean): BSONBoolean
- Definition Classes
- ToValue
-
implicit final
def
toDocument(js: JsObject): BSONDocument
- Definition Classes
- SharedValueConvertersLowPriority1
-
implicit final
def
toJsValueWrapper[T <: BSONValue](value: T): JsValueWrapper
- Definition Classes
- ToValue
-
implicit final
val
toNull: (JsNull.type) ⇒ BSONNull
- Definition Classes
- ToValue
-
implicit final
def
toNumber(js: JsNumber): BSONValue
- Definition Classes
- SharedValueConverters
-
implicit final
def
toStr(js: JsString): BSONValue
- Definition Classes
- ToValue
- Annotations
- @SuppressWarnings()
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
implicit final
def
toValue(js: JsValue): BSONValue
- Definition Classes
- SharedValueConvertersLowPriority1
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (ValueConverters, B)
- Implicit
- This member is added by an implicit conversion from ValueConverters to ArrowAssoc[ValueConverters] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc