knockout/knockout — pull request #1071 by rniemeyer (2013-08-16 01:44:17+00:00)
Title: ko.toJS() in 3.0.0beta omit toJSON function from output

In 3.0.0beta, ko.toJS was omitting toJSON function defined in the model from its output. This causes ko.JSON to failed to pickup custom serialization of the model.

```javascript
var model = function() {
var self = this;

self.firstName = "Bob";
self.lastName = "Person";

self.toJSON = function() {
var copy = {
firstName: self.firstName,
lastName: self.lastName.toUpperCase()
};
return copy;
}
}

ko.applyBindings(new model);
```

```html

```

Output in 2.3.0 (as expected)
```javascript
{"firstName":"Bob","lastName":"PERSON"}
```

Output in 3.0.0beta
```javascript
{"firstName":"Bob","lastName":"Person"}
```