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

Description Usage Arguments Details Value See Also Examples

View source: R/bson.R

Description

Display formatted output of a mongo.bson object.

Usage

1
2
## S3 method for class 'mongo.bson'
print(x, ...)

Arguments

x

(mongo.bson The object to display.

...

Parameters passed from generic.

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.

Value

The parameter is returned unchanged.

See Also

mongo.bson.print,
mongo.bson.

Examples

1
2
3
4
5
6
7
8
9
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)

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