I'd really like to see just 2 more functional changes to the JSON
serialization/encoding before we get to Rails 2.0.
First, and I think this is really crucial because without it all the
efforts to output JSON from ActiveRecord objects would have been half
in vain, is to allow us to do this in controllers:
@authors = Author.find(:all)
render :json => @authors.to_json(:only => :name)
Currently you can only to_json on a _single_ AR::B instance, but not
for lists of them. I've a patch at http://dev.rubyonrails.org/ticket/9751
that does this but needs verification and probably more input.
The other change, while not as serious, is to get an unambiguous Time,
Date and DateTime #to_json format, i.e. to get dates encoding to JSON
2007/10/01 12:15:02 CDT
0/01/2007 12:15:02 CDT
gbuesing has a patch at http://dev.rubyonrails.org/ticket/9750 that
needs your help with verification and ideas on whether this different
date format would work.
This is the last sprint before Rails 2.0 I'm guessing so if you use
JSON at all please do chip in! Thanks for listening.