title: FullCalendar json error
body: <p>I've been trying to figure this out for over a day now.  I have FullCalendar installed (v1.5.1) and i'm working with AgendaWeek.  I have asp.net v.3.5 installed and I"m trying to populate the calendar with events from a Json feed but it's not working.  Here is my code and errors.  If anybody can help, that would be great.  </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
      $(document).ready(function() {
  
          //$(".myClass").css("border", "3px solid red");
  
  
          /* initialize the Web Service  
          -----------------------------------------------------------------*/
          $(".external-events").empty();
          $.ajax({
              type: "POST",
              async: false,
              contentType: "application/json; charset=utf-8",
              url: "StudiesWebService.asmx/Return_Available_Codes",
              data: "{}",
              dataType: "json",
              success: function(data) {
  
                  var c = eval(data.d);
  
                  for (var i in c) {
                      $(".external-events").append(c[i]);
                  };
  
              },
              error: function(e) { $(".external-events").html("An Error Occured" + e); }
          });
  
          /* end of web service call
          -----------------------------------------------------------------*/
  
  
  
          /* initialize the external events
          -----------------------------------------------------------------*/
  
          $('#external-events div.external-event').each(function() {
  
              // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
              // it doesn't need to have a start or end
              var eventObject = {
                  title: $.trim($(this).text()) // use the element's text as the event title
              };
  
              // store the Event Object in the DOM element so we can get to it later
              $(this).data('eventObject', eventObject);
  
              // make the event draggable using jQuery UI
              $(this).draggable({
                  zIndex: 999,
                  revert: true,      // will cause the event to go back to its
                  revertDuration: 0  //  original position after the drag
              });
  
          });
  
          /* end of initialize the external events
          -----------------------------------------------------------------*/
  
  
  
          /* initialize the calendar
          -----------------------------------------------------------------*/
  
          $('#calendar').fullCalendar({
              header: {
                  left: '',
                  center: '',
                  right: ''
  
              },
              eventSources: [
  
              // your event source
      {
      url: 'StudiesWebService.asmx/EventList',
      type: 'POST',
      dataType: "json",
      contentType: "application/json; charset=utf-8",
      error: function() {
          alert('there was an error while fetching events!');
      },
      color: 'yellow',   // a non-ajax option
      textColor: 'black' // a non-ajax option
  }
  
              // any other sources...
  
       ],
              date: 17, //starting date.
              contentHeight: 780, //height of the calendar
              defaultEventMinutes: 60, //each droppable event is set to 60 min.
              slotMinutes: 15, //slot time interval
              defaultView: 'agendaWeek', //view to agenda week
              minTime: 6, //start time
              maxTime: 21, //end time
              allDaySlot: true,
              editable: true,
              droppable: true, // this allows things to be dropped onto the calendar !!!
              drop: function(date, allDay) { // this function is called when something is dropped
  
  
                  // retrieve the dropped element's stored Event Object
                  var originalEventObject = $(this).data('eventObject');
  
                  // we need to copy it, so that multiple events don't have a reference to the same object
                  var copiedEventObject = $.extend({}, originalEventObject);
  
                  // assign it the date that was reported
                  copiedEventObject.start = date;
                  copiedEventObject.allDay = allDay;
  
                  // render the event on the calendar
                  // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
                  $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
  
                  // is the "remove after drop" checkbox checked?
                  if ($('#drop-remove').is(':checked')) {
                      // if so, remove the element from the "Draggable Events" list
                      $(this).remove();
                  }
  
              }
  
          });
  
          //End of Calendar
  
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <blockquote>
    <p>Web Service:</p>
  </blockquote>
  
  <pre><code> [WebMethod]
  [ScriptMethod]
  public string EventList(double start, double end)
  {
       var list = new List&lt;string&gt;();
       list.Add("[{\"id\":\"36\"title\":\"Birthday party\",\"start\":\"2011-10-18 07:30\",\"end\":\"2011-10-18 10:30\",\"allDay\":false}]");
  
      JavaScriptSerializer jss = new JavaScriptSerializer();
      string strJSON = jss.Serialize(list.ToArray());
      return strJSON;
  
  
  
  
  }
  </code></pre>
  
  <p><strong>Firebug Data and Errors</strong></p>
  
  <p>Header:</p>
  
  <p>Response Headersview source
  Date    Thu, 20 Oct 2011 13:56:52 GMT
  Server  Microsoft-IIS/6.0
  MicrosoftOfficeWebServer    5.0_Pub
  X-Powered-By    ASP.NET
  X-AspNet-Version    2.0.50727
  jsonerror   true
  Cache-Control   private
  Content-Type    application/json; charset=utf-8
  Content-Length  1063
  Request Headersview source
  Host    anessrv
  User-Agent  Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
  Accept  application/json, text/javascript, <em>/</em>; q=0.01
  Accept-Language en-us,en;q=0.5
  Accept-Encoding gzip, deflate
  Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Connection  keep-alive
  Content-Type    application/json; charset=utf-8
  X-Requested-With    XMLHttpRequest
  Referer <a href="http://anessrv/fullcalendar/default6.aspx" rel="nofollow">http://anessrv/fullcalendar/default6.aspx</a>
  Content-Length  31
  Pragma  no-cache
  Cache-Control   no-cache</p>
  
  <p>Post:</p>
  
  <p>Source
  start=1318737600&amp;end=1319342400</p>
  
  <p>Response:</p>
  
  <p>{"Message":"Invalid JSON primitive: start.","StackTrace":"   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()\r\n   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)\r\n   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)\r\n   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)\r\n   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)\r\n   at System.Web.Script.Services.RestHandler.GetRawParamsFromPostRequest(HttpContext context, JavaScriptSerializer serializer)\r\n   at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n   at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.ArgumentException"}</p>