title: Type 'System.String' is not supported for deserialization of an array
body: <p>I'm having issues with deserializing a nested array of JSON objects in c# using JavascriptDeserializer or NewtonJSON. I've looked everywhere on here and tried suggested fixes, but it keeps giving me this: 
  <strong>Edit</strong> added full Response error</p>
  
  <pre><code>{
  "Message": "Type 'System.String' is not supported for deserialization of an array.",
  "StackTrace": "   at System.Web.Script.Serialization.ObjectConverter.ConvertListToObject(IList list, Type type, JavaScriptSerializer 
          serializer, Boolean throwOnError, IList&amp; convertedList)  
      at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer 
          serializer, Boolean throwOnError, Object&amp; convertedObject)\r\n   
      at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer 
          serializer, Boolean throwOnError, Object&amp; convertedObject)\r\n   
      at System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary`2 rawParams)\r\n   
      at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, 
          IDictionary`2 rawParams)\r\n   
      at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)",
  "ExceptionType": "System.InvalidOperationException"
  </code></pre>
  
  <p>}</p>
  
  <p>The JSON it sends to the webservice ends up looking like this:</p>
  
  <pre><code>{
      "ProfileEntries": [
          {
              "TypeId": "C",
              "CodeId": "HEARTDZ ",
              "StudComment": "testComment"
          },
          {
              "TypeId": "C",
              "CodeId": "HIBLOOD "
          },
          {
              "TypeId": "F",
              "CodeId": "MARFANF ",
              "StudComment": "testComment"
          },
          {
              "TypeId": "F",
              "CodeId": "MITRALF "
          }
      ]
  }
  </code></pre>
  
  <p>The reason you see some objects without "StudComment" is because I'm using knockout to save a value that is not originally part of the object when loaded.</p>
  
  <p>My web service basically does this to get a list of the deserialized JSON <strong>Edit</strong> added method name</p>
  
  <pre><code>public void SaveProfileEntries(string ProfileEntries)
      {
          var healthInfoProfileEntries = new JavaScriptSerializer().Deserialize&lt;HealthEntries&gt;(ProfileEntries); 
  </code></pre>
  
  <p>These are the classes I'm using to deserialize the data:</p>
  
  <pre><code>public class HealthEntries
  {
      [JsonProperty("ProfileEntries")]
      public List&lt;HealthEntry&gt; ProfileEntries { get; set; }
  }
  
  public class HealthEntry
  {
      [JsonProperty("TypeId")]
      public string TypeId { get; set; }
  
      [JsonProperty("CodeId")]
      public string CodeId { get; set; }
  
      [JsonProperty("StudComment")]
      public string StudComment { get; set; }
  }
  </code></pre>
  
  <p>It's confusing because when I test it using VS unit tests, it works perfectly, but when I'm using it in my website, it gives me the same InvalidOperationException</p>
  
  <p>I've tried NewtonJSON with this method but it does not work either</p>
  
  <pre><code>var healthInfoProfileEntries = (HealthEntries)JsonConvert.DeserializeObject(ProfileEntries, typeof(HealthEntries));
  </code></pre>
  
  <p>Any help is appreciated, thanks.</p>