Skip to content

JSON File Documentation

Kherld edited this page Sep 11, 2023 · 2 revisions

This JSON file contains a list of questions. Each question is represented by an object with the following properties:

  • id: A unique identifier for the question.
  • question: The text of the question.
  • question_type: The type of question, such as "multiple-choice" or "true/false".
  • answers: An array of strings that contain the possible answers to the question.
  • correct_answer: The index of the correct answer in the answers array.
  • month: The month in which the event happened.

The id property must be a unique number. The question property must be a string. The answers property must be an array of strings. The correct_answer property must be an integer. The month property is optional.

  • Here is an example of a question object:

    [
      {
        "id": 1,
        "question": "What is the greatest worship?",
        "question_type": "multiple-choice",
        "answers": ["the prayer", "Zakat", "unification. -- Tawheed"],
        "correct_answer": "unification. -- Tawheed",
        "event_month": "null"
      },
      // ... (more questions)
    ]
    

To use the JSON file, you can use a JSON parser to read the file and then access the properties of each question object.

Clone this wiki locally