title: Deserialization to object with private field
body: <p>I'm developing SDK for Web API. I make http call using httpClient to endpoint and if there are some errors I got the following response with status code 400</p>
  
  <pre><code>{
      "errors": {
          "InstanceId": [
              {
                  "code": "GreaterThanValidator",
                  "message": "'InstanceId' must be greater than '0'."
              }
          ],
          "Surcharges[0]": [
              {
                  "code": null,
                  "message": "Surcharge Name is invalid. It should not be empty."
              }
          ]
      }
  }
  </code></pre>
  
  <p>In my application (SDK) I have class that should contain a collection of grouped errors.       </p>
  
  <pre><code> public class ErrorResponse
      {
          private readonly IDictionary&lt;string, IList&lt;Error&gt;&gt; _errors;
  
          public ErrorResponse()
          {
              _errors = new Dictionary&lt;string, IList&lt;Error&gt;&gt;();
          }
  
          public ErrorResponse(string propertyName, string code, string message)
              : this()
          {
              AddError(propertyName, code, message);
          }
  
          public IReadOnlyDictionary&lt;string, IList&lt;Error&gt;&gt; Errors =&gt;
              new ReadOnlyDictionary&lt;string, IList&lt;Error&gt;&gt;(_errors);
  
          public void AddError(string propertyName, string code, string message)
          {
              if (_errors.ContainsKey(propertyName))
              {
                  _errors[propertyName].Add(new Error(code, message));
              }
              else
              {
                  _errors.Add(propertyName, new List&lt;Error&gt; { new Error(code, message) });
              }
          }
      }
  </code></pre>
  
  <p>How can I deserialize that json to <code>ErrorResponse</code> class? I've tried this but errors always empty:</p>
  
  <pre><code>string content = await responseMessage.Content.ReadAsStringAsync();
  var validationErrors = JsonConvert.DeserializeObject&lt;ErrorResponse&gt;(content);
  </code></pre>
  
  <p>How can I do that in proper way?</p>