title: Boost c++ property - if key does not exist then set to false
body: <p>I am new to json parsing with boost using the property tree.</p>
  
  <p>If I have this hash:</p>
  
  <pre><code>foo = {'test1',true}
  
  ptree pt;
  bool v = pt.get&lt;bool&gt;("test2");
  </code></pre>
  
  <p>I need to check a key exists and if not set it to false.</p>
  
  <p>How do I do that gracefully?</p>
  
  <p>Thanks</p>