title: Comparing JSON structure
body: <p>I'm in the process of testing an API that returns JSON. The value returned has child objects (a date object with from and to properties for example). I have a sample JSON string and the string being returned by the API. What's the best way to compare the two by key only and not value so that only the structure of the JSON is compared (using C# in this instance in case that has any baring)? I've seen similar questions being asked but not quite what I'm looking for.</p>
  
  <p>The JSON in the question at the moment looks something like this:</p>
  
  <pre><code>{
     "collection":[{
        "timePeriod":{
           "from": "2017-01-01",
           "to": "2017-02-01"
        },
        "type": "a",
        "amount": 463872,
        "outstanding": 463872,
        "due": "2017-03-08"
     }]
  }
  </code></pre>