title: Knockout.js: ko.toJSON does not convert viewmodel to JSON
body: <p>I am having very strange issue of my viewmodels not being converted to JSON on IIS. If i debug the same code on my system, it works fine and converts viewmodesl to JSON. Same code does not produce the same result on IIS.</p>
  
  <p>This is how my viewmodels look like after calling ko.toJSON on them.</p>
  
  <p>On IIS:</p>
  
  <pre><code>"{"__ko_mapping__":{"ignore":[],"include":["_destroy"],"copy":[],"mappedProperties": {"__type":true,"Prop1":true,"Prop2":true,"Prop3":true,"Prop4":true,"Prop5":true}}}"
  </code></pre>
  
  <p>On Local</p>
  
  <pre><code>{"__type":"DealerModel","Prop1":"","Prop2":"","Prop3":"","Prop4":"","Prop5":"Some Name  ltd"}}}"
  </code></pre>
  
  <p>This is how my DealerModel class looks like:</p>
  
  <pre><code>[Serializable]
  Public class DealerModel
  {
      public string Porp1 { get; set; }
      public string Porp2 { get; set; }
      public string Porp3 { get; set; }
      public string Porp4 { get; set; }
      public string Porp5 { get; set; }
  }
  </code></pre>
  
  <p>I guess the problem is somehow DealerModel is not being passed as type to JSON or something.</p>
  
  <p>Has anyone faced this issue? What could be the problem here?</p>
  
  <p>This is how i convert my viewmodesl to JS. The method on the server side expects arraylist.</p>
  
  <pre><code>            var jsonViewModel = '';
              jsonViewModel = ko.toJSON(myNameSpace.ViewModel1);
              jsonViewModel = jsonViewModel.replace(/\/Date\((.*?)\)\//gi, "new Date($1)");
              saveArray[0] = jsonViewModel
  
              jsonViewModel = ko.toJSON(myNameSpace.ViewModel2);
              jsonViewModel = jsonViewModel.replace(/\/Date\((.*?)\)\//gi, "new Date($1)");
              saveArray[1] = jsonViewModel
  
  $.ajax({
                  type: "POST",
                  url: "Services/SomeService.asmx/SaveObjects",
                  cache: true,
                  contentType: "application/json; charset=utf-8",
                  data:"{args:" + ko.toJSON(saveArray) + "}",
                  dataType: "json"
              });
  </code></pre>
  
  <p>SaveObjects method expects arrayList.</p>