title: Unable to cast object of type 'MongoDB.Bson.BsonString' to type 'MongoDB.Bson.BsonBoolean'
body: <p>I am getting an error: "Unable to cast object of type 'MongoDB.Bson.BsonString' to type 'MongoDB.Bson.BsonBoolean'."</p>
  
  <p>Here is Code 1:</p>
  
  <pre><code>var json = "{ 'foo': 'bar' }";
  var document = BsonSerializer.Deserialize&lt;BsonDocument&gt;(json);
  </code></pre>
  
  <p>Here is Code 2 with a different method:</p>
  
  <pre><code>var json = "{ 'foo': 'bar' }";
  var document = new BsonDocument();
  document.AddRange(BsonDocument.Parse(json));
  </code></pre>
  
  <p>I am using MongoCSharpDriver v2.1. Can anyone assist?</p>