def default_root_key(object_class)
      if (serializer = ScopedSerializer.find_serializer_by_class(object_class))
        root_key = serializer.find_scope(:default).options[:root]
      end

      if root_key
        root_key.to_s
      elsif object_class.respond_to?(:model_name)
        object_class.model_name.element
      else
        object_class.name
      end
    end
def default_root_key(object_class)
      if (serializer = ScopedSerializer.find_serializer_by_class(object_class))
        root_key = serializer.find_scope(:default).options[:root]
      end

      if root_key
        root_key.to_s
      elsif object_class.respond_to?(:model_name)
        object_class.model_name.element
      else
        object_class.name
      end
    end
Tries to find the default root key.

 @example
   default_root_key(User) # => 'user'