ActiveSupport::JSON.encode appears to work. Is that better than using to_json?