Hi there

I have a save function which has been working fine using prototype 1.6
for the past 2 years.
This function obtains sentence annotations stored in a hash and sends
them to the server via an Ajax request as JSON objects.

However, I just switched to prototype 1.7 to benefit from speed in DOM
navigation.
The following no longer works:

        var conceptJSON = Object.toJSON(conceptHash);
        alert("The conceptJSON is " + Object.toJSON(conceptHash));

The alert basically doesn't even happen.
I also tried with the dummy example given in the prototype
documentation:

var datatest = $H({name: 'Violet', occupation: 'character', age:
25 });
 alert(Object.toJSON(datatest));

The alert fails here too. When I try the same with prototype 1.6 I see
a string containing the hash members as expected and the results are
saved without a problem.

Can you please suggest a way round this problem? How should one
convert a hash to a JSON object in prototype 1.7. The toJSON function
definition has changed between the two versions and there doesn't seem
to be backward compatibility. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to