I meant, "Thinking about it, ...". Am 24.01.2007 um 18:44 schrieb Thomas Fuchs:
> > As you can only generate yourself (as Ajax is not cross-domain), > that's probably not necessary, but it wouldn't hurt either. > One thing is that stuff like this can introduce very strange bugs > that can take very long to debug ("whoops, where's my JSON gone?"). > > Think about it, how about a Object.fromJSON(json) function for this? > > Best, > Thomas > > Am 24.01.2007 um 17:17 schrieb mryhanen: > >> >> Glad I found this discussion and that auto evaluation of the response >> body depending on Media Type is in the works since it's a good thing >> and the X-JSON header does generate some confusion. >> >> One suggestion though: Shouldn't the json text be verified before >> evaluted, as described in the application/json RFC >> (http://www.ietf.org/rfc/rfc4627.txt): >> >> var my_JSON_object = !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test( >> text.replace(/"(\\.|[^"\\])*"/g, ''))) && eval('(' + >> text >> + ')'); >> >> >> >> Matti Ryhänen >> >> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---