Clearly, I understand that it must be a Tuple[String,BSONValue]
But how can one do this:
BSONDocument(
"field1" -> "field2"
)
Here, as you can clearly see, "field2" is a String, not a BSONValue. So, clearly, it is implicitly converted to a BSONValue.
What I am after is the ability for this implicit conversion to be applied to a list. Just as a BSONDocument can be created with any number of types like so:
BSONDocument(
"field1" -> "value1" // String -> BSONString
"field2" -> 2 // Integer -> BSONInteger
)
So too, I would like to be able to pass a list with these values which are then implicitly converted to BSONValues. Is there just no way of doing this?