google/closure-library — pull request #374 by pauldraper (2014-11-14 22:16:56+00:00)
Title: Fix goog.json.serialize treatment of functions

`goog.json.serialize` sometimes returns invalid JSON.

```javascript
goog.json.serialize([function(){},function(){}]) // returns '[,]'
```

While it is parseable by the lenient `goog.json.parse`, it is invalid JSON, and breaks for other parsers, e.g. `JSON.parse`.

The behavior is now follows the [ECMAScript standard](http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3).

```javascript
goog.json.serialize([function(){},function(){}]) // returns '[null,null]'
goog.json.serialize({foo:function(){}}) // returns '{}'
```