title: Knockout and MVC3: Posting JSON to action, serializing twice? Can't convert to C# objects?
body: <p>I've got a Knockout Model that gets posted via a save method:</p>
  
  <pre><code> self.save = function(form) {
          ko.utils.postJson($("form")[0], self);
      };
  </code></pre>
  
  <p>I check the request to make sure all the data is properly being posted (it is):</p>
  
  <p><img src="https://i.stack.imgur.com/bio8B.png" alt="enter image description here"></p>
  
  <p>However, when I get to my action:</p>
  
  <pre><code> [HttpPost]
   public ActionResult Create(EquipmentCreateModel equipmentCreateModel)
   {
      /stuff here
   }
  </code></pre>
  
  <p>BuildingCode and Room contain escaped quotes, and identifiers is totally not null but has a count of 0:</p>
  
  <p><img src="https://i.stack.imgur.com/aCfhB.png" alt="enter image description here"></p>
  
  <p>And my ModelState is not valid, there is one error, for the <code>Identifiers</code> property which has an attempted value of :</p>
  
  <p><img src="https://i.stack.imgur.com/nKl6V.png" alt="enter image description here"></p>
  
  <p>and the Exception message is:</p>
  
  <blockquote>
    <p>"The parameter conversion from type 'System.String' to type 'System.Collections.Generic.KeyValuePair`2[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' failed because no type converter can convert between these types."</p>
  </blockquote>
  
  <p>My Model:</p>
  
  <pre><code>public class EquipmentCreateModel
  {
  //used to populate form drop downs
  public ICollection&lt;Building&gt; Buildings { get; set; }
  public ICollection&lt;IdentifierType&gt; IdentifierTypes { get; set; }
  
  [Required]
  [Display(Name = "Building")]
  public string BuildingCode { get; set; }
  
  [Required]
  public string Room { get; set; }
  
  [Required]
  [Range(1, 100, ErrorMessage = "You must add at least one identifier.")]
  public int IdentifiersCount { get; set; } //used as a hidden field to validate the list
  public string IdentifierValue { get; set; } //used only for knockout viewmodel binding
  
  public IDictionary&lt;Guid, string&gt; Identifiers { get; set; }
  }
  </code></pre>
  
  <p>Now first I thought it was a problem with knockout, but then I found out the data wasn't being posted in the request correctly. I fixed that and still had the same problem. I thought MVC3 automatically converts Json now? Why are my simple properties appearing in escaped quotes and why can't my identities collection properly populate from the posted data?</p>