oanderson wrote:
> Hi,
>
> I'm just getting into this and can't seem to get the evalJSON() to
> work.
>
> I'm using the stuff exactly out of the api docs.
>
> <script>
>
> new Ajax.Request('ClientStatusData.jsp', { method:'get',
> onSuccess: function(transport){
> json = '{ "name": "Violet", "occupation":
> "character" }'.evalJSON();
Why even use a JSON string? Just use a literal:
json = { "name": "Violet", "occupation": "character" };
--
Michael Peters
Developer
Plus Three, LP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---