Rails 2.0 serialize

ActiveRecord in Rails 1.2.x has a method: serialize(attr_name,
class_name = Object). I was wondering, given the new JSON
serialization in 2.0, if it will be possible to request JSON instead
of YAML when serializing data to a database column? Same goes for XML.
It seems logical to modify the method to: serialize(column_name,
options = {}).

Then you could do something like:

class User < ActiveRecord::Base
serialize :preferences,
:class_name => ‘Hash’,
:format => :json