BSON main API
BSON main API
import reactivemongo.api.bson._ // { "name": "Johny", "surname": "Doe", "age": 28, "months": [1, 2, 3] } BSONDocument.empty ++ ("name" -> "Johny") ++ ("surname" -> "Doe") ++ ("age" -> 28) ++ ("months" -> array(1, 2, 3)) // { "_id": generatedId, "name": "Jane", "surname": "Doe", "age": 28, // "months": [1, 2, 3], "details": { "salary": 12345, // "inventory": ["foo", 7.8, 0, false] } } document.++("_id" -> generateId, "name" -> "Jane", "surname" -> "Doe", "age" -> 28, "months" -> array(1, 2, 3), "details" -> document( "salary" -> 12345L, "inventory" -> array("foo", 7.8, 0L, false)))
System properties:
The following properties can be set (e.g. using JVM -D
options).
reactivemongo.api.bson.bufferSizeBytes
(integer; default: 96
): Number of bytes used as initial size when allocating a new buffer.reactivemongo.api.bson.document.strict
(boolean; default: false
): Flag to enable strict reading of document (filter duplicate fields, see BSONDocument.asStrict).