title: What's a common way to test an API that makes requests that return very dynamic JSON
body: <p>We've written a .NET wrapper API for a set of web services. All this does is make requests and return JSON data. What's a good way to build a test framework for this? I can't think of how to do unit tests since I'd have to know the expected JSON string I'm getting back and that's very dynamic and complex. I thought of doing a WebTest but that just hits a page and crawls URLs. Any ideas out there?</p>
  
  <p>For example, it makes a request like:</p>
  
  <pre><code>http://supersecretwebsite.com/services/library?command=somecommand&amp;sort_order=ASC&amp;sort_by=MODIFIED_DATE&amp;page_number=0&amp;token=myapikey&amp;get_item_count=true
  </code></pre>
  
  <p>And returns JSON:</p>
  
  <pre><code>{"videos":[{"id":230482394920,"name":"foobarrr","shortDescription":"foo"],"page_number":0,"page_size":100,"total_count":0}
  </code></pre>