title: Reading json files in C++
body: <p>I'm trying to read in a JSON file. So far I have focused on using the <code>jsoncpp</code> library. However, the documentation is quite hard to understand for me. Could anyone explain in lay terms what it does? </p>
  
  <p>Say I have a <code>people.json</code> which looks like this:</p>
  
  <pre><code>{"Anna" : { 
        "age": 18,
        "profession": "student"},
   "Ben" : {
        "age" : "nineteen",
        "profession": "mechanic"}
   }
  </code></pre>
  
  <p>What happens when I read this in? Can I create some sort of data structure <code>people</code> which I can index by <code>Anna</code> and <code>Ben</code> as well as <code>age</code> and <code>profession</code>? What would be the data type of <code>people</code>? I thought it would be something similar to a (nested) map, but map values always have to have the same type, don't they?</p>
  
  <p>I have worked with python before and my "goal" (which may be ill-set for C++) is to obtain the equivalent of a nested python dictionary.  </p>