class ActiveModel::Serializer

def as_json(options=nil)

object including the root.
Returns a json representation of the serializable
def as_json(options=nil)
  options ||= {}
  if root = options.fetch(:root, @options.fetch(:root, _root))
    @options[:hash] = hash = {}
    @options[:unique_values] = {}
    hash.merge!(root => serializable_hash)
    hash
  else
    serializable_hash
  end
end