Learn R Programming

rmongodb (version 1.8.0)

mongo.bson.print: Display a mongo.bson object

Description

Display formatted output of a mongo.bson object.

Usage

mongo.bson.print(x, ...)

Arguments

x
(mongo.bson) The mongo.bson object to display.
...
Parameters passed from generic.

Value

The parameter is returned unchanged.

Details

Output is tabbed (indented to show the nesting level of subobjects and arrays).

See Also

mongo.bson

Examples

Run this code
buf <- mongo.bson.buffer.create()
mongo.bson.buffer.append(buf, "name", "Fred")
mongo.bson.buffer.append(buf, "city", "Dayton")
b <- mongo.bson.from.buffer(buf)

# all display the same thing
mongo.bson.print(b)
print.mongo.bson(b)
print(b)

Run the code above in your browser using DataLab