<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_json_reader_read">
  <info>
    <link type="guide" xref="bson_json_reader_t" group="function"/>
  </info>
  <title>bson_json_reader_read()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[int
bson_json_reader_read (bson_json_reader_t *reader,
                       bson_t             *bson,
                       bson_error_t       *error);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>reader</code></p></td><td><p>A <code xref="bson_json_reader_t">bson_json_reader_t</code>.</p></td></tr>
      <tr><td><p><code>bson</code></p></td><td><p>A <code xref="bson_t">bson_t</code>.</p></td></tr>
      <tr><td><p><code>error</code></p></td><td><p>A <code xref="bson_error_t">bson_error_t</code>.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>Reads the next BSON document from the underlying JSON source.</p>
  </section>

  <section id="errors">
    <title>Errors</title>
    <p>Errors are propagated via the <code>error</code> parameter.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>1 if successful and data was read. 0 if successful and no data was read. -1 if there was an error.</p>
  </section>
</page>
