ES6 Set does not serialize to array
<p>I've noticed that the <code>Set</code> in ES2015 does not implement a simple <code>toJSON</code> function, such as serializing to an array. Below is the implementation I came up with that does just that:</p>

<pre><code>Object.defineProperty(Set.prototype, 'toJSON', {
    enumerable: false,
    value: function () {
        return [...this];
    }
});
</code></pre>

<p><em>Is there any reason why a <code>Set</code> does not serialize to an array?</em></p>

<p><em>Are there any edge cases where this override for <code>toJSON</code> is a bad idea?</em></p>