title: JsonSerializer can't read stream from StreamReader
body: <p>I can't get the <em><code>DataContractJsonSerializer</code></em> object to swallow my stream. When I execute the code with the commented-out line active, I get to see the text provided (and it is a parsable JSON object), so I know that the stream is working fine.</p>
  
  <p>However, for some reason, the compiler complains that the <em><code>streamReader</code></em> I'm trying to shove down its throat in <em><code>ReadObject</code></em> isn't a <em><code>Stream</code></em>. Well, isn't it?!</p>
  
  <blockquote>
    <p>Argument 1: cannot convert from 'System.IO.StreamReader' to 'System.IO.Stream'</p>
  </blockquote>
  
  <p>What am I missing and how do I resolve it?</p>
  
  <pre><code>using (StreamReader streamReader = new StreamReader(...))
  {
    //String responseText = reader.ReadToEnd();
    MyThingy thingy = new MyThingy();
    DataContractJsonSerializer serializer 
      = new DataContractJsonSerializer(thingy.GetType());
    thingy = serializer.ReadObject(streamReader);
  }
  </code></pre>
  
  <p>I'm adapting <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer%28v=vs.95%29.aspx" rel="nofollow">this example</a> to work with <strong>my</strong> stream. Should I approach it from a different angle? If so - how?</p>