Slightly OT question here.

On Mar 10, 1:52 pm, Tobie Langel <> wrote:
> Hi Rob,
> We're planning to shift to native JSON support in our 1.7 release.
> Unfortunately, our implementation of JSON was based on Doug's initial
> one[1], which used different semantics altogether.
> It turns out that the steps we took back then to avoid naming
> collisions (using the toJSON method named rather than toJSONString
> which Doug's initial implementation used) have turned against us. So
> defaulting to the native implementation might cause some small
> backward-compatibility issues for some of our users, hence the wait
> for a more important release.

If I were in an environment where the JSON object and its methods were
not available, would doing something like this:

if (typeof JSON === "undefined") {
    JSON = {
        stringify : function (o) { return Object.toJSON(o); },
        parse : function (s) { return String(s).evalJSON(); }

produce the same output as using native JSON or the json2.js library,
or would there be differences? If there would be differences, what
would they be?


You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to