Thanks for the reply!
It turns out I was still using json.js with prototype 1.7
I have now removed any reference to json.js and everything works
fine  :-)

On Apr 13, 10:26 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi,
>
> > 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));
>
> It works just fine:http://jsbin.com/oruho
>
> So that tells us it's something about your specific environment, not
> Prototype itself. Recommend trying to create a minimalist, self-
> contained example demonstrating the problem, because that will either
> demonstrate where the real problem is, or form the basis of a bug
> report. :-)
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
>
> On Apr 13, 3:58 pm, vatakapha <maria.liak...@gmail.com> wrote:
>
> > 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