douglascrockford/JSON-js — pull request #41 by getify (2012-08-19 16:36:14+00:00)
Title: Bug: primitives in Object-form are improperly handled by 'decycle()'.

An illustration of the bug:
```
var a = {b: "foobar"};
var c = {d: new String("foobar") };

JSON.stringify(a); // {"b":"foobar"}
JSON.stringify(c); // {"d":"foobar"}

JSON.stringify(JSON.decycle(a)); // {"b":"foobar"}
JSON.stringify(JSON.decycle(c)); // {"d":{"0":"f","1":"o","2":"o","3":"b","4":"a","5":"r"}}
```
This affects all the other Object-forms of the primitives, including `Date`, and causes them to be improperly processed by `decycle()`, since they are `typeof === "object"`, which deviates from how `JSON.stringify()` handles such values.