title: How to pass complex objects via SignalR?
body: <p>There is an excellent tutorial on <a href="http://www.asp.net/signalr/overview/hubs-api/hubs-api-guide-javascript-client#callserver" rel="noreferrer">SignalR</a> that explains how to pass .NET objects as parameters to Javascript and vice versa.  In that case it passes a <code>ChatMessage</code> object to and from.</p>
  
  <p>However, the tutorial addresses a really simple object.  I'd like to see how to deal with complex .NET objects (that have other objects as properties) in Javascript.  </p>
  
  <p>For instance, consider the following object:</p>
  
  <pre><code>class Master {
      public List&lt;QuarterHour&gt; QuarterHours { get; set; }
      public List&lt;string&gt; Books { get; set; }
      public int EndDay { get; set; }
      public int StartDay { get; set; }
  }
  
  class QuarterHour {
      public MinuteInstance Minute {get; set;}
      public int HourStart { get; set;}
  }
  
  class MinuteInstance { 
      public bool Registered {get; set;}
      public int NumAttendees {get; set;}
  }
  </code></pre>
  
  <p>In .NET, I can reference a value like this: <code>master.QuarterHours[2].Minute.Registered</code>.  My questions:</p>
  
  <ol>
  <li>How would I do reference <code>master.QuarterHours[2].Minute.Registered</code> in the receiver method on the Javascript end?</li>
  <li>How would I build the <code>Master</code> object in Javascript to be sent to the .NET end?</li>
  </ol>