title: ko.toJSON did not convert JS object into JSON string
body: <p>inside my view model i have the following JS object which contains the observable values</p>
  
  <pre><code>var COAData = {
                  ACCOUNT_CODE: self.ACCOUNT_CODE,
                  ACCOUNT_NAME: self.ACCOUNT_NAME,
                  ACCOUNT_DESCRIPTION: self.ACCOUNT_DESCRIPTION,
                  OPENING_BALANCE: self.OPENING_BALANCE,
                  ACCOUNT_DATE: self.ACCOUNT_DATE,
                  MAIN_ACCOUNT: self.MAIN_ACCOUNT,
                  SUB_ACCOUNT: self.SUB_ACCOUNT,
                  CONTROLL_ACCOUNT: self.CONTROLL_ACCOUNT,
                  SUBSIDERY_ACCOUNT: self.SUBSIDERY_ACCOUNT,
                  ACCOUNT_TYPE: self.ACCOUNT_TYPE,
                  VOUCHING_ACCOUNT: self.VOUCHING_ACCOUNT
              };
  </code></pre>
  
  <p>and i am using following ajax function to send the above JS object as JSON string to my controller in MVC, to save the data into the database.</p>
  
  <pre><code>self.submitCOA = function () {                           
                  $.ajax(                
                      {
                          type: "post",
                          url: "/ChartOfAccounts/Create",                        
                          contentType: "application/json",
                          dataType: "json",
                          data: ko.toJSON(COAData),
                          success: function (data) {
                              alert("New Accoungt with Account #" + self.ACCOUNT_CODE(data.ACCOUNT_CODE) + "added successfully");
                              //GetChartOfAccounts();
                          },//success function end
                          error: function (error) {
                              alert(error.status + "&lt;!----!&gt;" + error.statusText);
                          }//error function end
                      }
                      );//ajax function end
              };
  </code></pre>
  
  <p>while debugging, i came to know that ko.toJSON did not convert the JS object (COAData) into JSON string. Instead an empty string is passed to the contrller</p>
  
  <p>any help?</p>