title: Knockout binding json, unable to parse attributes
body: <p>I'm attempting to data bind JSON data return from a Grails controller to a table using Knockout. I believe the JSON being returned is good:</p>
  
  <pre><code>result
  [
  Object
  class: "project.Person"
  firstName: "Bill"
  id: 2
  lastName: "Fake"
  __proto__: Object
  , 
  Object
  class: "project.Person"
  firstName: "Dale"
  id: 3
  lastName: "Fake"
  __proto__: Object
  , 
  Object
  class: "project.Person"
  firstName: "Linda"
  id: 4
  lastName: "Fake"
  __proto__: Object
  ]
  </code></pre>
  
  <p>Here's my javascript:</p>
  
  <pre><code>      var Directory =  {
          list: ko.observableArray([])
        };
  
        var Person = function(id, first, last) {
          this.id = ko.observable(id);
          this.firstName = ko.observable(first);
          this.lastName = ko.observable(last);
        };
  
        var loadPeople = function() {
          $.ajax({
            url: "${createLink(action: "getPeople")}",
            type: "post",
            contentType: "application/json",
            success:  function(result) {
              for(p in result) {
                Directory.list.push(new Person(p.id,p.firstName,p.lastName));
              }
              ko.applyBindings(Directory);
            }
          });
        };
  
        loadPeople();
  </code></pre>
  
  <p>And finally, my markup:</p>
  
  <pre><code>         &lt;table&gt;
            &lt;thead&gt;
              &lt;tr&gt;&lt;th&gt;Id&lt;/th&gt;&lt;th&gt;First name&lt;/th&gt;&lt;th&gt;Last name&lt;/th&gt;&lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody data-bind="foreach: list"&gt;
                &lt;tr&gt;
                  &lt;td data-bind="text: id"&gt;&lt;/td&gt;
                  &lt;td data-bind="text: firstName"&gt;&lt;/td&gt;
                  &lt;td data-bind="text: lastName"&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>I've looked at the similar questions and tried <code>list.Person</code>, <code>Person</code>, passing the observable array to the bindings instead of the <code>Directory</code>.  When I debug, <code>Directory.list()</code> contains an array of size <code>3</code> of type <code>Person</code> so it looks to be correct.</p>
  
  <p>The error:</p>
  
  <blockquote>
    <p>Uncaught Error: Unable to parse binding attribute. Message:
    ReferenceError: id is not defined; Attribute value: text: id</p>
  </blockquote>
  
  <p>Any help is appreciated.</p>