# 编程内容
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status, :sub_discipline_id)

# 课程
json.tag_discipline_id  @hack.tag_discipline_containers.pluck(:tag_discipline_id)

# 代码
json.language @hack.language
json.code @hack.code

# 测试集
json.hack_sets do
  json.array! @hack.hack_sets do |set|
    json.(set, :id, :input, :output, :position)
  end
end
json.user do
  json.partial! 'users/user', user: current_user
end
