BSON_JSON_READER_NEW(3)

NAME
bson_json_reader_new()

SYNOPSIS
bson_json_reader_t *
bson_json_reader_new (void                *data,
                      bson_json_reader_cb  cb,
                      bson_json_destroy_cb dcb,
                      bool                 allow_multiple,
                      size_t               buf_size);

PARAMETERS

.B data
    A user-defined pointer.

.B cb
    A bson_json_reader_cb.

.B dcb
    A bson_json_destroy_cb.

.B allow_multiple
    A bool indicating if more than one document is allowed in the stream.

.B buf_size
    A size_t containing the requested internal buffer size.

DESCRIPTION
Creates a new bson_json_reader_t that can read from an arbitrary data source in a streaming fashion.

RETURNS
A newly allocated bson_json_reader_t that should be freed with bson_json_reader_destroy().

COLOPHON
This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.