title: MongoDB C++ Driver 3.0 get document in string and avoid json
body: <p>I am trying to get double type data from the database as the <a href="https://docs.mongodb.com/getting-started/cpp/query/" rel="nofollow">documentation</a> says:</p>
  
  <pre><code>auto cursor = db["collection"].find({}, opts);
  for (auto&amp;&amp; doc : cursor) {
      std::cout &lt;&lt; bsoncxx::to_json(doc) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>But I want to avoid converting doc into json because I lost decimal precision. For example:</p>
  
  <p>In database shows this:</p>
  
  <pre><code>"lng" : -58.4682568037741
  </code></pre>
  
  <p>But after converting to json, I receive this:</p>
  
  <pre><code>"lng" : -58.4682
  </code></pre>
  
  <p>Is there any way to convert it directly to string, for example? </p>