class ActiveModel::DefaultSerializer

def as_json(options={})

def as_json(options={})
  instrument('!serialize') do
    return [] if @object.nil? && @wrap_in_array
    hash = @object.as_json
    @wrap_in_array ? [hash] : hash
  end
end