Skip to content

Question file format

Alexey Stepankov edited this page May 11, 2019 · 3 revisions

Example - example.json

The file contains two blocks, header и questions

{
    "header": {},
    "questions": []
}

header contains some information about this test

{
    "name": "test name",
    "Number": "test number",
    "Passing Score": "needed score count for pass test",
    "Time Limit": "time limit",
    "File Version": "file version",
    "describe": "test description",
    "tags": ["supported tags for questions", "..."]
}

questions contains questions, each question contains next fields

{
  "id": question number,
  "text": "question text",
  "answers": ["", ""],
  "variants": [{}, {}],
  "tags": ["question tag", "..."],
  "hintUrl": "Absolute url to hint",
  "hint": "simple text hint"
}

one question can be the single type, for choice (if filled variants field) or for input (if filled answers field)

field answers contains one or more integer or string and describe available correct answers if the field does not empty that means the question is a type input

field variants contains answers variants in the format below and if the field does not empty that means the question is a type choice

{
    "id": "answer number or him id, example A-Z",
    "text": "answer text",
    "isCorrect": flag is means than this answer is correct
}
Clone this wiki locally