title: jQuery JSON Posting: Invalid object passed in, ':' or '}' expected
body: <p>When I am trying to post JSON to server side function then I am getting this error</p>
  
  <blockquote>
    <p>Invalid object passed in, ':' or '}' expected</p>
  </blockquote>
  
  <p>I am working ckeditor and this way I am getting data from ckeditor.</p>
  
  <pre><code>var ckEditorCtrl = GetClientID("CKEditor1").attr("id");
  var newcontent = getEditorContents(ckEditorCtrl.toString());
  
  function GetClientID(id, context) {
      var el = $("#" + id, context);
      if (el.length &lt; 1)
          el = $("[id$=_" + id + "]", context);
      return el;
  }
  
  function getEditorContents(ename) {
      if (CKEDITOR.instances[ename])
          return CKEDITOR.instances[ename].getData();
  
      var e = $("textarea[id$='" + ename + "']")[0];
      if (e)
              return e.value;
  
      return false;
  }
  </code></pre>
  
  <p>The HTML I am trying to post capture from ckeditor as follows</p>
  
  <pre><code>&lt;img alt="" src="https://shop.bba-reman.com/wp-content/uploads/2017/05/Toyota-Auris-gearbox-actuator-1-300x300.jpg" style="width: 300px; height: 300px;" /&gt;&lt;br /&gt;
  &lt;br /&gt;
  We can &lt;strong&gt;REPAIR &lt;/strong&gt;your Toyota Auris gearbox actuator
  </code></pre>
  
  <p>This way I am posting data. Here is the code</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/abcpage.aspx/contentinsert",
          //data: '{"CID":"' + $("[id$='txtContentID").val() + '","CTitle":"' + $("[id$='txtTitle").val() + '","CDesc":"' + $("[id$='txtDesc").val() + '","CKey":"' + $("[id$='txtKeywords").val() + '","CBody":"' + newcontent + '"}',
          data: '{"CID":"' + $("#txtContentID").val() + '","CTitle":"' + $("#txtTitle").val() + '","CDesc":"' + $("#txtDesc").val() + '","CKey":"' + $("#txtKeywords").val() + '","CBody":"' + newcontent + '","OldBody":"' + oldcontent + '"}',
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function (msg) {
          InsertSuccess(msg);
          ComboLoad();
          HideProgressAnimation();
  
      },
      error: function (XMLHttpRequest, textStatus, errorThrown) {
          var jsonError = JSON.parse(XMLHttpRequest.responseText);
          alert(jsonError.Message);
          ComboLoad();
          HideProgressAnimation();
      }
  });
  </code></pre>