title: DataContractJsonSerializer not working
body: <p>I use the <strong>DataContractJsonSerializer</strong> to convert a JSON string into a class, but always return an empty object.
  I tested the string with the' JSON Viewer' extension in Notepad, is valid. Searched for a bug for a long time and compared other examples.</p>
  
  <p>This is my JSON string in shortened form:</p>
  
  <pre><code>{
  "error":[],
  "result": {
          "BCH": {"aclass":"currency","altname":"BCH","decimals":10,"display_decimals":5},
          "DASH": {"aclass":"currency","altname":"test"}
      }
  }
  </code></pre>
  
  <p>The classes <strong>GetAssetInfoResponse</strong> and <strong>AssetInfo</strong> contain properties with <strong>DataMember</strong> attributes, but the property <strong>Result</strong> (after Deserialize) does not contain any objects. </p>
  
  <pre><code>[DataContract]
  [KnownType(typeof(AssetInfo))]
  public class GetAssetInfoResponse 
  {
      [DataMember(Name = "error")]
      public List&lt;string&gt; Error { get; set; }
  
      [DataMember(Name = "result")]
      public List&lt;Dictionary&lt;string, AssetInfo&gt;&gt; Result { get; set; }
  }
  
  [DataContract]
  public class AssetInfo
  {
      /// &lt;summary&gt;
      /// Alternate name.
      /// &lt;/summary&gt;
      [DataMember(Name = "altname")]
      public string Altname { get; set; }
  
      /// &lt;summary&gt;
      /// Asset class.
      /// &lt;/summary&gt;
      [DataMember(Name = "aclass")]
      public string Aclass { get; set; }
  
      /// &lt;summary&gt;
      /// Scaling decimal places for record keeping.
      /// &lt;/summary&gt;
      [DataMember(Name = "decimals")]
      public int Decimals { get; set; }
  
      /// &lt;summary&gt;
      /// Scaling decimal places for output display.
      /// &lt;/summary&gt;
      [DataMember(Name = "display_decimals")]
      public int DisplayDecimals { get; set; }
  }
  </code></pre>
  
  <p>This is my test code:</p>
  
  <pre><code>        var stream = new MemoryStream(Encoding.Unicode.GetBytes(strName))
          {
              Position = 0
          };
          var serializer = new DataContractJsonSerializer(typeof(GetAssetInfoResponse));
          GetAssetInfoResponse test = (GetAssetInfoResponse)serializer.ReadObject(stream);
  
          Console.ReadLine();
  </code></pre>
  
  <p>I can't use the <strong>Newtonsoft.Json</strong> extension because the project should not contain any external dependencies.
  Is there another way to transfer JSON strings into classes?</p>
  
  <p>Thank you for your time</p>