title: No such node json boost
body: <p>Trying my hardest to figure this out. Take the following header in C++:</p>
  
  <pre><code>#include &lt;boost/property_tree/ptree.hpp&gt;
  #include &lt;string&gt;
  
  #include "../math/gmath.h"
  
  class json
  {
      public:
          json ( std::string filename );
          template &lt;class T&gt; T getData ( std::string key );
      private:
          std::string m_contents;
          boost::property_tree::ptree m_data;
  };
  
  template &lt;class T&gt; T json::getData ( std::string key )
  {
      return m_data.get&lt;T&gt; ( key );
  }
  </code></pre>
  
  <p>And look at the following two JSON files.</p>
  
  <p>I can find all the data just fine from the following JSON.</p>
  
  <pre><code>{
      "gameName" : "File and Asset Test 1",
      "displayWidth" : 640,
      "displayHeight" : 480,
      "fullScreen" : false
  }
  </code></pre>
  
  <p>But for some reason I get "No such node" on the following JSON.</p>
  
  <pre><code>{
      "assetType" : "font",
      "assetName" : "default font",
      "assetFile" : "dat/assets/dfont.png",
      "charMap" : "`1234567890-=~!@#$%^&amp;*()_+qwertyuiop[]\\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:\"zxcvbnm,./ZXCVBNM&lt;&gt;? "
  }
  </code></pre>
  
  <p>Here is the error: </p>
  
  <p>terminate called after throwing an instance of 'boost::exception_detail::clone_impl >'
    what():  No such node (assetType)</p>
  
  <p>Thing is, I iterate over the whole thing outputting the keys and values and I see "assetType" in the list! Why is Boost failing to see what is clearly there (And parsed!) and how can I fix this? I looked all over this site and the documentation with no clue where it's going wrong found.</p>
  
  <p>This is the call I made (Strip a bunch of irrelevant parts in the call: InstanceofJSON.getData ( "assetType" );</p>