mongo.bson.from.JSON: Convert JSON to BSON Object

Description Usage Arguments Value See Also Examples

View source: R/bson_convert.R

Description

Converts a JSON string to a mongo BSON object.

Usage

1
mongo.bson.from.JSON(JSON, simplifyVector = FALSE, ...)

Arguments

JSON

(string) A valid JSON string.

simplifyVector

(FALSE) coerse JSON arrays containing only scalars into a vector.

...

additional parameters parsed to fromJSON

Value

A BSON object.

See Also

mongo.find,
mongo.bson.from.list,
mongo.bson ,
fromJSON.

Examples

1
2
mongo.bson.from.JSON('{"name" : "Peter"}')
mongo.bson.from.JSON('{"_id" : 1}')

jonkatz2/rmongodb documentation built on May 19, 2019, 7:30 p.m.