> But how is this being taken care of exactly? It seems like, for
> consistency's sake, we'd want the structure of JSON serialization to
> be as close to Hash#from_xml's output as possible.
I'm actually not sure I agree with the desire for consistency here.
Working (in javascript) with a to_json'd AR object is actually
annoying now.
You get an array of 'customers', but then in order to get the
customer's first_name you need to do:
customers.each(function(customer) {
alert(customer.customer.first_name);
});
I'm not sure that it'd be an improvement to move this to:
customers.customers.each(function(customer) {
alert(customer.customer.first_name);
});
--
Cheers
Koz
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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-core?hl=en.