I would definitely recommend JSON over XML
For building or consuming API's, ActiveModel works well.
For straight JSON parsing YAJL-ruby is a nice library:
http://rdoc.info/projects/brianmario/yajl-ruby
In Activerecord you can easily store hashes, arrays etc in text columns using by serializing the attr:
See "Saving arrays, hashes, and other non-mappable objects in text columns" here:
http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001799
Example:
class User < ActiveRecord::Base
serialize :preferences
end
user = User.create(:preferences => { "background" => "black", "display" => large })
User.find(user.id).preferences # => { "background" => "black", "display" => large }