Well, that code has a problem or two, but you get the idea..
Colin Mollenhour wrote:
> Please explain the necessity of a wrapper for the httprequest object.. I
> see it simply as more overhead and extraneous bulk. I definitely like
> the string.prototype.evalJSON and the options.sanitizeJSON, but rather
> than the Ajax.Response wrapper, consider this simple patch to the
> current system:
>
> + var contentType = this.getHeader('Content-type');
> if (state == 'Complete') {
> try {
> + if(contentType &&
> contentType.strip().startsWith('application/json'))
> + Object.extend(json || {},
> transport.responseText.evalJSON(options.sanitizeJSON) || {});
> this._complete = true;
>
> Will these three lines not accomplish what this patch is all about,
> making automatic JSON evaluation more usable? Keep it simple.
>
> Thanks,
> Colin
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---