Learn R Programming

rmongodb (version 1.8.0)

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

Description

Display formatted output of a mongo.bson object.

Usage

"print"(x, ...)

Arguments

x
(mongo.bson The 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).

This version is an alias of mongo.bson.print() so that print() will properly handle the mongo.bson class.

See Also

mongo.bson.print, 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
print.mongo.bson(b)
mongo.bson.print(b)
print(b)

Run the code above in your browser using DataLab