Quiz Application

Quiz Setup

No file selected

Expected JSON Structure

The quiz data must be a JSON object with the following structure:


{
  "title": "Optional Quiz Title (String)",
  "questions": [
    {
      "question": "Question text (String, required)",
      "options": ["Option A", "Option B", "Option C"],
      "correctAnswer": "Option B", // String OR Array of strings
      "explanation": "Optional explanation text (String)"
    }
  ]
}
                    

Field Explanations:

  • title (String, Optional): The overall title of the quiz.
  • questions (Array, Required): Array of question objects. Must not be empty.
  • Each question object:
    • question (String, Required): Text of the question.
    • options (Array of Strings, Required): At least two options.
    • correctAnswer (String or Array of Strings, Required): Must match value(s) in options.
    • explanation (String, Optional): Explanation text.