← Back to catalog / 返回目录

Question Bank JSON Format / 题库 JSON 格式说明

Write your own bank as a .json file (UTF-8), then use “Import your own bank” on the catalog page to practice it — nothing is uploaded; it stays in your browser.

English

A bank is a JSON array of question objects. Three question types are supported: single-choice, multiple-answer, and fill-in-the-blank.

Fields

FieldRequiredMeaning
id✅ every questionUnique string within the file, e.g. "ch3-12". Progress (wrong/star records) is keyed on it.
question✅ (unless image present)The stem, plain text. \n makes a line break.
choices✅ for choice questionsArray of at least 2 strings.
answersingle-choice0-based index into choices (first choice = 0).
answersmultiple-answerArray of 0-based indexes, e.g. [0,2]. Player switches to checkboxes automatically; all must match.
typefill-in onlySet "fill" (or just provide blanks).
blanksfill-inOne array per blank, each listing the accepted answers: [["8","eight"]] = 1 blank with 2 accepted spellings; [["a"],["b"]] = 2 blanks.
question_htmloptional (fill-in)HTML stem with <input data-blank="1"> placed where blanks belong (1-based). Omit it and inputs are appended below the stem.
answer_setsoptional (fill-in)Alternative whole-row combinations; any ONE set matching counts as correct.
imageoptionalImage URL or base64 data:image/... string — or an array of them. Shown above the choices.
sourceoptionalWhere the question came from; shown small under the card.

Grading rules

中文

题库就是一个 JSON 数组,每个元素是一道题。支持三种题型:单选、多选、填空。

Complete example / 完整示例

[
  {
    "id": "demo-1",
    "question": "Which fabric is approved for aircraft covering?",
    "choices": ["Polyester", "Cotton bedsheet", "Nylon tarp", "Canvas drop cloth"],
    "answer": 0,
    "source": "Chapter 3 – Coverings"
  },
  {
    "id": "demo-2",
    "question": "Select ALL tools required for fabric testing. (multiple answers)",
    "choices": ["Punch tester", "Hammer", "Maule tester", "Torque wrench"],
    "answers": [0, 2]
  },
  {
    "id": "demo-3",
    "type": "fill",
    "question": "A hole smaller than ____ inches may be repaired with a doped-on patch.",
    "blanks": [["8", "eight"]]
  },
  {
    "id": "demo-4",
    "question": "Identify the part shown in the image.",
    "image": "https://example.com/part-diagram.png",
    "choices": ["Rib", "Spar", "Longeron"],
    "answer": 1
  }
]

Save as e.g. my-bank.json → catalog page → “Import your own bank”. The Extractor's “导出全部合并 JSON” produces exactly this format. / 保存为 .json 后到目录页导入即可;提取器导出的合并 JSON 就是这个格式。